Adjustable transformations from semantic web languages

ABSTRACT

Methods and systems of transforming ontologies of semantic web languages are disclosed. A user may adjust configuration settings for a transformation of primitives of a Semantic Web ontology language into primitives of a software modeling language. The adjusted configuration settings may be stored on a storage device. The transformation of primitives of the Semantic Web ontology language into primitives of the software modeling language may be performed using the adjusted configuration settings stored on the storage device. The adjusted configuration settings stored on the storage device may be selected for use in a subsequent transformation of primitives of the Semantic Web ontology language into primitives of the software modeling language. In some embodiments, the semantic web language is Resource Description Framework Schema (RDFS). In some embodiments, the software modeling language is Ecore.

TECHNICAL FIELD

The present application relates generally to the technical field of dataprocessing, and, in various embodiments, to methods and systems oftransforming ontologies of Semantic Web languages.

BACKGROUND

The Semantic Web is an effort led by the World Wide Web Consortium (W3C)aiming to allow the exchange and reuse of data by formalizing themeaning of information. As a classic means of knowledge representation,ontologies play a vital role in this effort. The Resource DescriptionFramework (RDF) and RDF Schema (RDFS) are the W3C recommendations forontology definition. They are increasingly being used to defineontologies which serve as reference models in a specific domain (e.g.,the ISO 15926 Oil & Gas ontology).

Currently, the majority of conventional software engineers typicallyneither have knowledge in Semantic Web languages such as RDFS, nor dothey have the time for familiarizing themselves with the new technology.Yet, at the same time, Semantic Web languages are increasingly beingused for specifying reference models on which software has to be built.Therefore, conventional software developers are prompted to buildsoftware on the basis of such ontologies.

BRIEF DESCRIPTION OF THE DRAWINGS

Some embodiments of the present disclosure are illustrated by way ofexample and not limitation in the figures of the accompanying drawings,in which like reference numbers indicate similar elements, and in which:

FIG. 1 is a network diagram illustrating a client-server system, inaccordance with an example embodiment;

FIG. 2 is a block diagram illustrating enterprise applications andservices in an enterprise application platform, in accordance with anexample embodiment;

FIG. 3 illustrates a four layer architecture of MOF, in accordance withan example embodiment;

FIG. 4 illustrates a simplified view of the MOF metamodel, in accordancewith an example embodiment;

FIG. 5 illustrates a simplified version of the Ecore metamodel, inaccordance with an example embodiment;

FIG. 6 is a block diagram of an ontology transformation system, inaccordance with an example embodiment;

FIG. 7 is a flowchart illustrating a method of transforming a SemanticWeb language ontology into a software meta-model and model, inaccordance with an example embodiment;

FIG. 8 is a flowchart illustrating another method of transforming aSemantic Web language ontology into a software meta-model and model, inaccordance with an example embodiment;

FIG. 9 illustrates an improved helper class generation, in accordancewith an example embodiment;

FIG. 10 illustrates an RDF graph showing a resource being used as both aclass and an individual, in accordance with an example embodiment;

FIG. 11 illustrates an RDF graph showing a resource being used as both aclass and a property, in accordance with an example embodiment;

FIG. 12 illustrates an RDF graph showing a resource being used as both aproperty and an individual, in accordance with an example embodiment;

FIG. 13 illustrates an RDF graph showing a resource being used as both aclass, a property, and an individual, in accordance with an exampleembodiment;

FIG. 14 illustrates a property chain, in accordance with an exampleembodiment;

FIG. 15 illustrates a simplified plug-in dependency diagram, inaccordance with an example embodiment;

FIG. 16 illustrates a package dependency diagram, in accordance with anexample embodiment;

FIG. 17 illustrates a package structure of an implementation, inaccordance with an example embodiment;

FIG. 18 illustrates the composition of a config package, in accordancewith an example embodiment;

FIG. 19 illustrates the composition of an owl package, in accordancewith an example embodiment;

FIG. 20 illustrates the composition of an ecore package, in accordancewith an example embodiment;

FIG. 21 illustrates a graphical user interface for specifying an OWLontology, in accordance with an example embodiment;

FIG. 22 illustrates a graphical user interface for specifying aconfiguration file, in accordance with an example embodiment;

FIG. 23 illustrates a graphical user interface for specifying generaltransformation settings, in accordance with an example embodiment;

FIG. 24 illustrates a graphical user interface for specifying defaultsettings for distinct entities, in accordance with an exampleembodiment;

FIG. 25 illustrates a graphical user interface for specifying an outputdirectory, in accordance with an example embodiment;

FIG. 26 illustrates a graphical user interface for specifying a reasonedfor the transformation, in accordance with an example embodiment;

FIG. 27 illustrates a configuration file editor, in accordance with anexample embodiment;

FIG. 28 illustrates a graphical user interface for generaltransformation configuration, in accordance with an example embodiment

FIG. 29 illustrates a graphical user interface with a configuration formaximum preservation, in accordance with an example embodiment;

FIG. 30 illustrates an Ecore diagram after a first informationpreserving transformation, in accordance with an example embodiment;

FIG. 31 illustrates a graphical user interface for customizing the nameof anonymous classes, in accordance with an example embodiment;

FIG. 32 illustrates an Ecore diagram after customizing class names, inaccordance with an example embodiment;

FIG. 33 illustrates a graphical user interface with a configuration fora simple model, in accordance with an example embodiment;

FIG. 34 illustrates an Ecore diagram of a clean and simple softwaremodel, in accordance with an example embodiment;

FIG. 35 illustrates a graphical user interface for creatingCustomPushDown elements for the isPArtOf property, in accordance with anexample embodiment;

FIG. 36 illustrates a graphical user interface for setting the domainand range values for the CustomPushDown elements, in accordance with anexample embodiment;

FIG. 37 illustrates an Ecore diagram after pushing down the isPartOfreference, in accordance with an example embodiment; and

FIG. 38 is a block diagram of an example computer system on whichmethodologies described herein may be executed, in accordance with anexample embodiment.

DETAILED DESCRIPTION

Example methods and systems of transforming ontologies of semantic weblanguages are described. In the following description, for purposes ofexplanation, numerous specific details are set forth in order to providea thorough understanding of example embodiments. It will be evident,however, to one skilled in the art that the present embodiments may bepracticed without these specific details.

In the present disclosure, a solution is provided that may allow for theincorporation of RDFS ontologies into the familiar environment ofconventional software engineers. Thus, software developers are relievedfrom learning the specifics of ontology languages and are enabled tobuild software on the ontology at the same time. More specifically, thesolution may provide a flexible transformation from RDFS to Ecore. Ecoreis the UML “dialect” of the wide-spread software engineering environmentEclipse. UML is a wide-spread software engineering modeling language.The transformation may seamlessly incorporate and import a given RDFSontology into Eclipse. A wizard may guide the developer throughalternative ways of importing a given ontology and adjustingconfiguration settings for the transformation.

In some embodiments, a computer-implemented method may comprisingenabling a user to adjust configuration settings for a transformation ofprimitives of a Semantic Web ontology language into primitives of asoftware modeling language, storing the adjusted configuration settingson a storage device, performing, by a machine, the transformation ofprimitives of the Semantic Web ontology language into primitives of thesoftware modeling language using the adjusted configuration settingsstored on the storage device, and enabling a selection of the adjustedconfiguration settings stored on the storage device for use in asubsequent transformation of primitives of the Semantic Web ontologylanguage into primitives of the software modeling language.

In some embodiments, performing the transformation may comprisegenerating Object Constraint Language (OCL) constraints for primitivesof the software modeling language. In some embodiments, the semantic weblanguage is Resource Description Framework Schema (RDFS). In someembodiments, the semantic web language is Web Ontology Language (OWL).In some embodiments, the software modeling language is Ecore. In someembodiments, the primitives of the Semantic Web language compriseclasses, properties, individuals, and resources. In some embodiments,the method may further comprise enabling the user or another user toadjust the adjusted configuration settings for use in the subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.

In some embodiments, a system may comprise a machine having at least oneprocessor, and an ontology transformation module on the machine. Theontology transformation module may be configured to enable a user toadjust configuration settings for a transformation of primitives of aSemantic Web ontology language into primitives of a software modelinglanguage, store the adjusted configuration settings on a storage device,perform the transformation of primitives of the Semantic Web ontologylanguage into primitives of the software modeling language using theadjusted configuration settings stored on the storage device, and enablea selection of the adjusted configuration settings stored on the storagedevice for use in a subsequent transformation of primitives of theSemantic Web language into primitives of the software modeling language.

In some embodiments, the ontology transformation module is furtherconfigured to generate Object Constraint Language (OCL) constraints forprimitives of the software modeling language. In some embodiments, thesemantic web language is Resource Description Framework Schema (RDFS).In some embodiments, the semantic web language is Web Ontology Language(OWL). In some embodiments, the software modeling language is Ecore. Insome embodiments, the primitives of the Semantic Web language compriseclasses, properties, individuals, and resources. In some embodiments,the ontology transformation module may be further configured to enablethe user or another user to adjust the adjusted configuration settingsfor use in the subsequent transformation of primitives of the SemanticWeb ontology language into primitives of the software modeling language.

In some embodiments, a non-transitory machine-readable storage devicemay store a set of instructions that, when executed by at least oneprocessor, causes the at least one processor to perform the operationsand method steps discussed within the present disclosure.

FIG. 1 is a network diagram illustrating a client-server system, inaccordance with an example embodiment. A platform (e.g., machines andsoftware), in the example form of an enterprise application platform112, provides server-side functionality, via a network 114 (e.g., theInternet) to one or more clients. FIG. 1 illustrates, for example, aclient machine 116 with programmatic client 118 (e.g., a browser, suchas the INTERNET EXPLORER browser developed by Microsoft Corporation ofRedmond, Wash. State), a small device client machine 122 with a smalldevice web client 120 (e.g., a browser without a script engine), and aclient/server machine 117 with a programmatic client 119.

Turning specifically to the example enterprise application platform 112,web servers 124 and Application Program Interface (API) servers 125 maybe coupled to, and provide web and programmatic interfaces to,application servers 126. The application servers 126 may be, in turn,coupled to one or more database servers 128 that facilitate access toone or more databases 130. The web servers 124, Application ProgramInterface (API) servers 125, application servers 126, and databaseservers 128 may host cross-functional services 132. The applicationservers 126 may further host domain applications 134.

The cross-functional services 132 provide services to users andprocesses that utilize the enterprise application platform 112. Forinstance, the cross-functional services 132 may provide portal services(e.g., web services), database services and connectivity to the domainapplications 134 for users that operate the client machine 116, theclient/server machine 117 and the small device client machine 122. Inaddition, the cross-functional services 132 may provide an environmentfor delivering enhancements to existing applications and for integratingthird-party and legacy applications with existing cross-functionalservices 132 and domain applications 134. Further, while the system 100shown in FIG. 1 employs a client-server architecture, the embodiments ofthe present invention are of course not limited to such an architecture,and could equally well find application in a distributed, orpeer-to-peer, architecture system.

FIG. 2 is a block diagram illustrating enterprise applications andservices in an enterprise application platform 112, in accordance withan example embodiment. The enterprise application platform 112 includescross-functional services 132 and domain applications 134. Thecross-functional services 132 may include portal modules 140, relationaldatabase modules 142, connector and messaging modules 144, ApplicationProgram Interface (API) modules 146, and development modules 148.

The portal modules 140 may enable a single point of access to othercross-functional services 132 and domain applications 134 for the clientmachine 116, the small device client machine 122 and the client/servermachine 117. The portal modules 140 may be utilized to process, authorand maintain web pages that present content (e.g., user interfaceelements and navigational controls) to the user. In addition, the portalmodules 140 may enable user roles, a construct that associates a rolewith a specialized environment that is utilized by a user to executetasks, utilize services and exchange information with other users andwithin a defined scope. For example, the role may determine the contentthat is available to the user and the activities that the user mayperform. The portal modules 140 include a generation module, acommunication module, a receiving module and a regenerating module. Inaddition the portal modules 140 may comply with web services standardsand/or utilize a variety of Internet technologies including Java, J2EE,SAP's Advanced Business Application Programming Language (ABAP) and WebDynpro, XML, JCA, JAAS, X.509, LDAP, WSDL, WSRR, SOAP, UDDI andMicrosoft .NET.

The relational database modules 142 may provide support services foraccess to the database(s) 130, which includes a user interface library136. The relational database modules 142 may provide support for objectrelational mapping, database independence and distributed computing. Therelational database modules 142 may be utilized to add, delete, updateand manage database elements. In addition, the relational databasemodules 142 may comply with database standards and/or utilize a varietyof database technologies including SQL, SQLDBC, Oracle, MySQL, Unicode,JDBC.

The connector and messaging modules 144 may enable communication acrossdifferent types of messaging systems that are utilized by thecross-functional services 132 and the domain applications 134 byproviding a common messaging application processing interface. Theconnector and messaging modules 144 may enable asynchronouscommunication on the enterprise application platform 112.

The Application Program Interface (API) modules 146 may enable thedevelopment of service-based applications by exposing an interface toexisting and new applications as services. Repositories may be includedin the platform as a central place to find available services whenbuilding applications.

The development modules 148 may provide a development environment forthe addition, integration, updating and extension of software componentson the enterprise application platform 112 without impacting existingcross-functional services 132 and domain applications 134.

Turning to the domain applications 134, the customer relationshipmanagement application 150 may enable access to and may facilitatecollecting and storing of relevant personalized information frommultiple data sources and business processes. Enterprise personnel thatare tasked with developing a buyer into a long-term customer may utilizethe customer relationship management applications 150 to provideassistance to the buyer throughout a customer engagement cycle.

Enterprise personnel may utilize the financial applications 152 andbusiness processes to track and control financial transactions withinthe enterprise application platform 112. The financial applications 152may facilitate the execution of operational, analytical andcollaborative tasks that are associated with financial management.Specifically, the financial applications 152 may enable the performanceof tasks related to financial accountability, planning, forecasting, andmanaging the cost of finance.

The human resource applications 154 may be utilized by enterprisepersonnel and business processes to manage, deploy, and track enterprisepersonnel. Specifically, the human resource applications 154 may enablethe analysis of human resource issues and facilitate human resourcedecisions based on real time information.

The product life cycle management applications 156 may enable themanagement of a product throughout the life cycle of the product. Forexample, the product life cycle management applications 156 may enablecollaborative engineering, custom product development, projectmanagement, asset management and quality management among businesspartners.

The supply chain management applications 158 may enable monitoring ofperformances that are observed in supply chains. The supply chainmanagement applications 158 may facilitate adherence to production plansand on-time delivery of products and services.

The third-party applications 160, as well as legacy applications 162,may be integrated with domain applications 134 and utilizecross-functional services 132 on the enterprise application platform112.

The Resource Description Framework (RDF) is a formal language fordescribing structured information. It allows making statements aboutresources in regards to their relation to other resources with theintention to allow further processing and re-combination of theinformation represented by these resources, which may be done in theform of a directed multi-graph, where vertices and edges are labeledwith identifiers (RDF may use uniform resource idendifiers (URIs) orinternationalized resource identifiers (IRIs) as identifiers).

An RDF graph may be described by the collection of its edges, where theedge is given in the form of a triple: a subject-predicate-objectexpression, where the predicate represents the edge and hence therelation between the vertices, i.e., subject and object. RDF graphs canthus be serialized as a collection of all their triples. With N3,N-Triples and Turtle, several syntaxes exist that allow serialization ofRDF in triple form. However, due to well established tool andprogramming library support for XML, the main syntax for RDF is theXML-based serialization RDF/XML.

With RDF, individuals can be specified and set into relation to eachother:

-   -   ex:martin ex:isWriting ex:aDiplomaThesis.        Individuals can be set into relation with data values (also        called literals), and it is possible to assign types to        literals:

  ex:aDiplomaThesis ex:hasTitle “Semantic Web to Ecore” .ex:aDiplomaThesis ex:dueDate “2011-12-31”{circumflex over( )}{circumflex over ( )}xsd:date .Assigning a type to literals allows for proper interpretation bysoftware applications processing RDF documents. Types can also beassigned to resources:

-   -   ex:martin rdf:type ex:Student.        Assigning a type to resources signalizes that these entities        share common traits and marks these entities as elements of a        certain aggregation. This aggregation may be called a class.        Typically, the resources which are used as predicates in triples        express a relationship between individuals, classes or literals.        It seems inappropriate to consider these resources as        individuals or classes. RDF provides the class name rdf:Property        for the class of all relations, i.e., properties.    -   ex:hasTitle rdf:type rdf:property.

With these primitives, it is possible to express factual knowledge, orassertional knowledge, about individuals, but it is not possible toexpress more generic knowledge. With RDF, we cannot state that, e.g., ifsomeone writes a master thesis, then that person is a student. This kindof knowledge is often called terminological knowledge or schemaknowledge. RDF Schema (RDFS) was introduced by the W3C as a solution tothis problem. It extends the RDF vocabulary with basic elements forterminological knowledge representation and ontology authoring. Thisvocabulary is generic and not bound to a specific application area. Itspre-defined semantics (in form of axiomatic rules) allow specifying thesemantics of user-defined vocabularies.

RDFS provides common class names for the classes which were implicit inRDF, e.g., rdfs:Class for the class of all classes, rdfs:Resource forthe class of all Resources, etc. Also, several pre-defined propertieswere introduced to allow for subclassing, declaring subproperties,and/or restricting property values to a certain domain and range. Forinstance, the fact that any Student is also a person can be expressedlike this:

-   -   ex:Student rdfs:subClassOf ex:Person.        A similar relationship to the subclass relationship exists also        for properties:    -   ex:isHappilyMarriedTo rdfs:subPropertyOf ex:isMarriedTo.        The above triple states, that every individual who is happily        married to another individual is also just married to another        individual. So by stating    -   ex:martin ex:isHappilyMarriedTo ex:laure,        we can deduce that    -   ex:martin ex:isMarriedTo ex:laure        is also a valid statement.

If we would want to express that every individual who is married toanother individual must implicitly be a person, we can make use of theRDFS vocabulary rdfs:domain and rdfs:range:

  ex:isMarriedTo rdfs:domain ex:Person . ex:isMarriedTo rdfs:rangeex:Person .This point often leads to confusion among ontology novices, as the abovestatements do not prevent linking individuals by the propertyex:isMarriedTo who aren't persons, but rather implicitly declare theseindividuals as persons if set into relation via ex:isMarriedTo. This isintuitively opposed to the type-checking notion of nowadays softwareprogramming languages.

With RDF(S), it is possible to model simple ontologies and to deriveimplicit knowledge. However, its expressivity is limited and complexknowledge can often not be represented by RDF(S). To address thisproblem, the W3C introduced the Web Ontology Language (OWL). Like otherlanguages that allow the modeling of complex knowledge, OWL is based onformal logic and, hence, supports logic reasoning. To address thecomputational complexities inherent to logic reasoning on complexknowledge, three sublanguages (or species) of OWL were designed: OWLFull, OWL DL and OWL Lite.

OWL Full is the most expressive sublanguage. It contains OWL DL and OWLLite, as well as all of RDF(S). Because of its undecidability, fewsoftware tools are able to handle OWL Full.

OWL DL is based on description logic and is hence decidable. It iswidely supported by software tools; several reasoners are available forOWL DL, such as Pellet, HermiT, FaCT++ or TrOWL. In OWL DL, the use ofRDF(S) language constructs is restricted. For instance, rdfs:Class andrdf:property are not allowed. Also, it must be clearly distinguishedbetween classes, instances and the different types of properties (seebelow).

OWL Lite is the least expressive and is contained by OWL Full and OWLDL. Evidently, even more restrictions have to be respected in comparisonto OWL Full and OWL DL.

In addition to the syntaxes known from RDF(S), the W3C specified the XMLpresentation syntax for OWL, which is adapted to the OWL languageconstructs and provides better readability and less overhead over themuch more generic RDF/XML syntax while maintaining the compatibilityadvantages of XML. RDF/XML is the only normative syntax.

As noted above, OWL Full contains all of RDF(S). The higher expressivepower of OWL over RDF(S) is achieved by the addition of new vocabularywith pre-defined semantics. OWL provides its own vocabulary for classand property definition.

Classes can be defined by using owl:Class, as an enumeration of theirinstances and as combinations of other classes, viz. as the union, theintersection and the complement of another class. The latter definitionis based on formal logic constructs and also called complex classdefinition. Further complex class definitions involve propertyrestrictions and are derived from, e.g., the universal quantifier, theexistential quantifier and cardinalities.

For properties, two pre-defined classes exist: Properties of typeowl:ObjectProperty connect individuals with individuals, whileproperties of type owl:DatatypeProperty connect individuals with datavalues, i.e., with elements of datatypes.

OWL allows specifying certain characteristics of properties. Thisincludes domain and range like in RDF(S), but also includescharacteristics like transitivity, symmetry, functionality and inversefunctionality. OWL provides certain classes with special semantics;owl:Thing is the class of all instances and as such the superclass ofall classes, while owl:Nothing is the empty class, i.e., it contains noinstances. It is the subclass of all classes. If classes are inferred tobe equivalent to this class, they are denoted to be “unsatisfiable”,which indicates an erroneous contradiction in the ontology.

OWL was subsequently extended by the specification of OWL 2, whichintroduced new modeling primitives as well as so-called profiles OWL 2EL, OWL 2 QL, and OWL 2 RL, which allow for an even more fine-grainedtrade-off between complexity and expressivity.

Furthermore, the W3C introduced the functional-style syntax for thedefinition of OWL 2 in the W3C specification documents. Thisfunctional-style syntax uses a prefix notation and is given as a formalgrammar. Because of this, it is considered to be a clean, easilyreadable as well as easily parsable syntax. The only normative syntax isstill RDF/XML.

Model-Driven Engineering (MDE) refers to software engineering techniquesthat use software models as primary engineering artifacts. Below, wehighlight relevant key technologies of MDE.

The Meta Object Facility (MOF) is a standard for model-drivenengineering issued by the Object Management Group (OMG). It is, at itscore, an architecture for meta-metamodels, which originated in the OMG'sneed for a closed metamodel for UML's class modeling concepts. Inaddition, the MOF specification and its associated standards containfacilities for model processing, notably the XML Metadata Interchange(XMI) standard, which is commonly used as an interchange format forMOF-related models like UML models. Thus, MOF can be viewed as standardfor building metamodels. It acts as a bridge between differentmetamodels, so that models based on MOF-compliant metamodels can shareprocessing facilities (e.g., model transformation) or storage facilitieslike model repositories.

MOF is designed as a four layer architecture. FIG. 3 illustrates a fourlayer architecture 300 of MOF, in accordance with an example embodiment.Every layer represents another level of abstraction, with ameta-metamodel at the top, the M3 layer. The metametamodel on layer M3is also called MOF metamodel. FIG. 4 illustrates a simplified view ofthe MOF metamodel 400, in accordance with an example embodiment. Thislayer is used to define the metamodels on layer M2, as well as the metametamodel on layer M3 itself. Layer M2 is the layer for metamodels suchas UML or BPMN. It is the definition of how models of layer M1 arespecified. M1 is also called the model layer. It represents realizationsof one or more metamodels and comprises concrete physical or logicalmodels, such as an UML class diagram of an application, and describesthe format and semantics of data. The bottom layer, called data layer orM0 layer, contains the actual data, i.e., objects or instances.

MOF is a closed, strict meta-modeling architecture: closed, because itsmeta-metamodel (M3 layer) conforms to itself; strict, because everymodel element on every layer is strictly an instance of a model elementof the layer above.

MOF uses classes in the sense of object-oriented programming to definemodel elements which are used to describe metamodels of common modelinglanguages, such as UML. A subset of those elements is also known asEssential MOF (EMOF, as opposed to CMOF or Complete MOF). The EclipseModeling Framework (EMF) has specified a metamodel called Ecore, whichis virtually compatible to EMOF.

The Eclipse Modeling Framework (EMF) is an open source framework basedon the Eclipse Platform with the purpose of code generation with thehelp of structured data models. By default, the generated code is Javacode. The generated Java application is able to create instances of thegiven data model as well as query, manipulate and serialize theseinstances.

While EMF models are canonically represented with the Ecore metamodel(see below), actual models are usually specified using XML Schema,annotated Java interfaces or UML (several UML tools are supported). Adefinition of the model by XML Schema provides the user with the benefitof obtaining an adapted and potentially optimized XML serializationformat, while the two other methods are closer to the EMOF notion ofEcore. The specified models are subsequently used to generate an Ecoremodel. Models can be specified directly in Ecore as well, by means of asimple tree-based editor included in EMF. Furthermore, there is a JavaAPI to create a model dynamically (which we are using for theproof-of-concept implementation and for future full-edgedimplementations of the transformation proposed in this work).

Ecore provides a subset of MOF concepts and hence of UML class modelingconcepts. In fact, experience drawn from the development of Ecore hassubstantially influenced the definition of EMOF. Ecore and EMOF arelimited to classes, attributes and relations. Ecore and EMOF are closedmetamodels, i.e., they conform to themselves, so Ecore is itself an EMFmodel. In a typical use case, Ecore is found at the M2 and M3 levelssimultaneously, i.e., modelers specify their user models with Ecore,omitting the definition of a proper metamodel.

As noted above, with Ecore you can describe your domain with basicallythe same class modeling concepts as in UML: The metamodel class EClassis used to represent a class with a name and zero or more attributes andreferences, EAttribute is used to represent an attribute with a name anda datatype, EReference is used to represent one end of an associationbetween two classes and has a name, a containment flag and a referencetype, and finally EDatatype is used to represent a datatype. FIG. 5illustrates a simplified version of the Ecore metamodel 500, inaccordance with an example embodiment.

Because we make frequent use of the term EStructuralFeature in thiswork, we would like to add that both EAttribute and EReference aresubclasses of EStructuralFeature in the full Ecore metamodel.

As stated above, one benefit of EMF is code generation. Based on yourdata model, EMF may generate application mode, which can be modified andcustomized to the needs of the developer. Subsequent changes to themodel may be merged to existing code modifications as transparently aspossibly. Along with the actual application, EMF may also generate unittests, which help to secure the customization process. EMF provides alsothe possibility to generate a tree-based editor for your model, so youcan manually create and modify instances of the model. The components ofthis editor can be reused to develop a more sophisticated editor.

Further benefits of using EMF are model change notification, transparentmodel persistence (in general, Ecore models as well as instances ofEcore models are serialized in XMI, but other ways and formats can beconceived), data integration and sharing, model validation, and anefficient reflective API.

The Object Constraint Language (OCL) is a declarative language forconstraint and query expressions on UML and MOF (meta-) models. It ispart of the Unified Modeling Language (UML) standard, but the OMG hasdefined subsets of OCL which can be applied to any MOF-compliant andEMOF-compliant models. OCL can be applied at different layers of the MOFfour layer architecture 300 in FIG. 3. OCL is also a key-component ofthe OMG's standard for model transformations, QVT(Query/View/Transformation).

An OCL constraint may be structured into a context, zero or morestereotypes, and the actual OCL expressions. The context defines thescope of the constraint statement, e.g., a class, an interface etc. Thestereotype determines which type of expression is applied to thecontext, i.e., invariants, preconditions, postconditions, etc. Theactual expressions are specified in a syntax which is basedobject-oriented programming languages, and do usually resemble predicatelogic expressions. If, for example, one would like to express, that aperson is always younger than its parents, the OCL constraint may becomposed as follows:

-   -   context Person inv:self.Parent→for All (e|e.age>self.age)        Several different types of constraints can be distinguished:        invariants; preconditions and postconditions; initial and        derived values; definitions of new attributes and operations;        model queries; and guards for state transitions.

Concepts of Semantic Web languages RDF(S) and OWL differ from Ecore.These differences are designated focal points of any transformationeffort.

All things described in RDF(S) are called “resource” and are hence oftype rdfs:Resource. The way this resource is used influences therepresentation of this resource in the Ecore model. Resources with typerdfs:Class are candidates for an EClass in Ecore:

-   -   ex:Student rdf:type rdfs:Class.        Resources with type rdfs:Property are candidates for an        EReference or EAttribute in Ecore:    -   ex:hasTitle rdf:type rdf:Property.        There is no strict separation between classes and instances        (“individuals”) in RDF(S) like there is in OWL DL. All resources        of type rdfs:Class are classes, all resources of type        rdfs:Property are properties. Following these definitions, all        resources whose type is different from the above types or which        have no type at all could be considered individuals.

In the case where none of these sets (classes, properties, individuals)overlap, the transformation can be handled in a similar way as thetransformation from OWL DL to Ecore. However, a transformation fromRDF(S) must also consider the following cases:

-   -   Class+Individual Any resource which is of type rdfs:Class and at        least of one other type except rdfs:Property at the same time.    -   Class+Property Any resource which is of type rdfs:Class and of        type rdfs:Property, but not of any other type at the same time.    -   Property+Individual Any resource which is of type rdfs:Property        and at least of one other type except rdfs:Class at the same        time.    -   Class+Property+Individual Any resource which is of type        rdfs:Class, of type rdfs:Property and at least of one other type        at the same time.

In OWL, the classes owl:Thing and owl:Nothing exist by default, whereowl:Thing is the superclass of all classes and owl:Nothing is thesubclass of all classes. This enforces a class hierarchy with exactlyone class at the top and one class at the bottom. In Addition, owl:Thingserves as the set of all individuals.

Representations for owl:Thing and owl:Nothing may be created in theEcore world, and especially owl:Thing may be used to model common traitswhich are shared by all classes and instances like its IRI. As inRDF(S), comparable predefined classes do not exist. A transformationfrom RDF(S) to Ecore has to provide other means to model common traits.

RDF(S) and OWL are both based on the open world assumption (OWA). In anopen world, a statement is not per se false just because it is not knownto be true. In contrast, when adopting the closed world assumption(CWA), everything that is not known to be true is false. Ecore, likemany software engineering languages, is based on the closed worldassumption. A transformation from Semantic Web ontologies to Ecore mustconsider this difference.

The term “Unique Name Assumption” (UNA) was coined in the context ofdescription logic and ontologies. It refers to the assumption thatdifferent names refer to different entities. In RDF(S) and OWL, an IRIserves as identifier or name of an entity. As the unique name assumptionis not valid in RDF(S) and OWL, two different IRIs can denote identicalentities. In OWL, entities have to be explicitly declared different oridentical to another entity; although RDF(S) does not make the uniquename assumption either, no means to this purpose exist.

In Ecore, classes are organized in packages and identified by the classname. Inside a package, the class name must be unique. Different classnames denote two separate classes. References and attributes areattached to a specific class. Inside this class, the names forreferences and attributes must be unique, and different names denoteagain separate entities. In consequence, one could state that Ecoremakes the unique name assumption. Thus, a transformation from SemanticWeb ontologies to Ecore may take this discrepancy into account.

RDF(S) and OWL, as opposed to Ecore, are both designed for informationexchange and publication on the Web. Consequently, every entity and evenmodeling primitives are identified are identified via IRIs. Ecore andcomparable software engineering facilities do not know a comparablyconsistent identification mechanism and are not designed for knowledgepublication on the Web. Any transformation from Semantic Web languagesto Ecore has to provide the possibility to preserve these features to acertain degree.

While in Ecore and comparable software modeling languages, referencesand attributes are attached to a specific class, properties arefirst-class citizens in RDF(S) and OWL and exist “on their own”. As aconsequence, domain and range specifications are not a limitation as towhich individuals are allowed to be connected via the property inquestion; by connecting two individuals via a property, the type of thedomain or range is “assigned” to the individuals.

In OWL, a property is either an object property, which connectsindividuals to other individuals, or a data property, which connectsindividuals to typed or untyped literals. RDF(S) does not make thisdistinction and allows the connection to individuals and literals viaone and the same property. Also, the scope of application of propertiesin OWL is wider than in RDF(S). In the latter, properties are merelynames which are attached to a relation of two resources. In OWL, it ispossible to further qualify these relations with characteristics likesymmetry, transitivity, reflexivity etc. In addition, properties can beused in OWL to further describe classes, e.g., by restricting themembership of a class in regards to the quality or the quantity of therelations of the members of the class concerning specific properties.

Another notable difference between RDF(S) and OWL DL is the case ofproperties which are at the same time classes (i.e., of typerdfs:Class).

In Semantic Web languages, certain aspects of properties can bespecified in form of restrictions. Typically, these restrictions areapplied to the domain and range of a property; OWL permits therestriction of the cardinality as well, i.e., the number of values aproperty may have for a particular individual. Restrictions allowinferring of additional information. As an example, if the range of aproperty hasFather is restricted to a maximum of one value, and Daedalusand Daidalos are known to be the father of Icarus, it can be inferredthat Daidalos and Daedalus are identical, even if there is no statementasserting the sameness of both individuals.

The corresponding concept in Ecore is OCL constraints embedded intoEcore model entities. These constraints specify conditions which may notbe violated; no additional information can be inferred from theseconstraints. In the above example, if Daedalus and Daidalos are bothassigned as a value to Icarus' hasFather reference, the model wouldbecome invalid.

OWL and Ecore do not completely overlap in terms of expressiveness. AsRDF(S) is much less expressive than OWL, great differences are to beexpected in this domain between the transformation from OWL to Ecore andthe transformation from RDF(S) to Ecore.

RDF(S) does not support cardinality constraints for properties. Thecardinality is always implicitly constrained to 0..*. This is also thedefault behavior in OWL. However, in OWL, it is possible to restrict themembership of a class to members which fulfill specific cardinalityconditions. In the Ecore world, the cardinality of attributes is bydefault set to 0..1, which is also what a software engineer wouldintuitively expect, e.g., for an attribute like age. By maintaining theimplicit default cardinality from the ontology, the resulting Ecoremodel would, in the worst case, be cluttered with attributes which allowmultiple values.

Semantic Web ontologies contain terminological knowledge as well asassertional knowledge. As entities may belong to both types of knowledgeat the same time (at least in RDF(S) and OWL Full), no strict separationexists in RDF(S) and OWL. Ecore on the other hand, strictly separatesits model in several layers, with separate files, diagrams etc.

Formal semantics form the basis of RDF(S) and OWL. OWL DL is actually adescription logic. This allows for entailment of factual knowledge inRDFS or OWL ontologies by using rule-based inference engines for RDF(S)and so-called reasoners for OWL. These reasoners may perform subsumptionchecking, consistency checking, and instance classification. Viasubsumption checking, it is possible to infer super- and subclassrelations which are not explicitly specified in an ontology. Forexample, if in OWL a class Person is defined as the union of two classesMan and Woman, a reasoner will infer that Person is the superclass ofboth these classes. Consistency checking allows for detection ofcontradictions in an ontology. For example, if an individual isspecified to be member of two disjoint classes, a reasoned will inferthis to be inconsistent. With instance classification, it is possible todetermine if an instance is a member of a specific class without beingexplicitly assigned to this class.

FIG. 6 is a block diagram of an ontology transformation system 300, inaccordance with an example embodiment. The ontology transformationsystem 300 may comprise an ontology transformation module 620 on amachine having at least one processor. In some embodiments, the ontologytransformation module 620 may be incorporated into the enterpriseapplication platform 112 (e.g., reside on one or more of the applicationservers 126). The ontology transformation module 620 may be configuredto enable a user 610 on a device (e.g., any of machines 116, 117, and122 in FIG. 1) to adjust configuration settings for a transformation ofprimitives of a Semantic Web ontology language into primitives of asoftware modeling language. The ontology transformation module 620 mayalso be configured to store the adjusted configuration settings on astorage device. For example, the adjusted configuration settings may bestored in a configuration file in one or more database(s) 630, which maybe accessed by the ontology transformation module 620 for laterretrieval and use. In some embodiments, the database(s) 630 may beincorporated into the database(s) 130 in FIG. 1. However, it iscontemplated that other configurations are also within the scope of thepresent disclosure. The ontology transformation module 620 may furtherbe configured to perform the transformation of primitives of theSemantic Web ontology language into primitives of the software modelinglanguage using the stored adjusted configuration settings. The ontologytransformation module 620 may also be configured to enable a selectionof the stored adjusted configuration settings for use in a subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.

In some embodiments, the ontology transformation module 620 is furtherconfigured to generate Object Constraint Language (OCL) constraints forprimitives of the software modeling language. In some embodiments, thesemantic web language is Resource Description Framework Schema (RDFS).In some embodiments, the semantic web language is Web Ontology Language(OWL). In some embodiments, the software modeling language is Ecore. Insome embodiments, the primitives of the Semantic Web language compriseclasses, properties, individuals, and resources. In some embodiments,the ontology transformation module may be further configured to enablethe user or another user to adjust the adjusted configuration settingsfor use in the subsequent transformation of primitives of the SemanticWeb ontology language into primitives of the software modeling language.The ontology transformation module 620 may also be configured to performany of the features disclosed herein with respect to ontologytransformation.

FIG. 7 is a flowchart illustrating a method 700 of transforming aSemantic Web language ontology into a software meta-model and model, inaccordance with an example embodiment, in accordance with an exampleembodiment. It is contemplated that the operations of method 700 may beperformed by a system or modules of a system (e.g., ontologytransformation module 620 in FIG. 6).

At operation 710, a user may be enabled to adjust configuration settingsfor a transformation of primitives of a Semantic Web ontology languageinto primitives of a software modeling language. In some embodiments,adjusting the configuration settings may include selecting an option togenerate Object Constraint Language (OCL) constraints for primitives ofthe software modeling language. It is contemplated that otherconfiguration settings are also within the scope of the presentdisclosure. Other examples of configuration settings will be discussedin further detail below.

At operation 720, the adjusted configuration settings may be stored on astorage device. In some embodiments, the adjusted configuration settingsmay be stored along with other configuration settings in one or moreconfiguration file.

At operation 730, the transformation of primitives of the Semantic Webontology language into primitives of the software modeling language maybe performed using the adjusted configuration settings stored on thestorage device.

At operation 740, it may be determined whether a subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language will be performed.

If it is determined that a subsequent transformation will be performed,then the method 700 may proceed to operation 750, where the user, oranother user, may be enabled to select the adjusted configurationsettings stored on the storage device for use in the subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.

The method 700 may then return to operation 710, where the user may beenabled to adjust the selected configuration settings for use in thesubsequent transformation.

If it is determined at operation 740 that a subsequent transformationwill not be performed, then the method 700 may come to an end.

It is contemplated that any of the other features described within thepresent disclosure may be incorporated into method 700. Furthermore, insome embodiments, all of the operations in method 700 may be performedin the same session. However, in some embodiments, the some of theoperations may be performed in separate sessions. For example, in someembodiments, the adjusting of configuration settings (operation 710),storing of configuration settings (operation 720), and performing of thetransformation (operation 730) may be performed while the user isaccessing the ontology transformation module 620. The user may then stopuse of the ontology transformation module 620 (e.g., log off, shut downcomputing device being used to access the ontology transformation module620). Later, the user may return to using the ontology transformationmodule 620 (e.g., turn computing device back on, log on), at which timethe selection of the stored adjusted configuration settings (operation750) may be performed during a separate session as the previouslyperformed operations.

FIG. 8 is a flowchart illustrating another method 800 of transforming aSemantic Web language ontology into a software meta-model and model, inaccordance with an example embodiment. It is contemplated that theoperations of method 800 may be performed by a system or modules of asystem (e.g., ontology transformation module 620 in FIG. 6).

At operation 810, the ontology to be transformed may be selected. Theselection may comprise a file containing the ontology or a URL leadingto an ontology. In some embodiments, the ontology is either an RDF(S)ontology or an OWL ontology.

At operation 820, the selected ontology may be checked for consistency.In consistency checking, the terminal knowledge (TBox) and assertionalknowledge (ABox) of an ontology may be tested for contradictions. Forexample, if an individual is specified to be member of two disjointclasses, a reasoner may infer this to be inconsistent. If the givenontology is found to be inconsistent at operation 830, then thetransformation process may aborted.

If the given ontology is found to be consistent at operation 830, thenthe method 800 may proceed to operation 840, where subsumption checkingmay be performed. The subsumption checking may allow for the inferenceof super- and sub-class relations which are not explicitly specified inan ontology. For example, if, in OWL, a class Person is defined as theunion of two classes Man and Woman, a reasoner may infer that Person isthe superclass of both these classes.

At operation 850, instance classification may be performed. In instanceclassification, it may be determined if an individual (also calledinstance) is a member of a specific class without being explicitlyassigned to this class.

At operation 860, based on the result of the subsumption checking andthe instance classification, the ontology may be extended with helperclasses in order to have an explicit manifestation of all implicitknowledge, as well as to ensure that no instances are members of classeswith no sub- or super-class relationship.

At operation 870, the user may be able to make transformation decisions,both general and entity specific (classes, properties, individuals),each one contributing either to information preservation or to obtainingsimpler and cleaner software models. The user may adjust configurationsettings for the transformation accordingly.

At operation 880, based on the transformation decisions, the actualtransformation of all primitives of the selected ontology may beperformed.

At operation 890, the result of the transformation may be stored. Theresult may be stored in two places, one containing the former TBoxrepresenting the meta-model in Ecore terminology, the other containingthe former ABox, i.e., the instance of the meta-model.

It is contemplated that any of the other features described within thepresent disclosure may be incorporated into method 800.

In some embodiments of the transformation of RDF(S) modeling concepts orprimitives, every modeling concept or primitive may be transformed to anappropriate counterpart in the Ecore world in such a way that maximizesadjustability and information preservation.

A resource is considered to be a simple resource if it is exclusively aclass, a property or an individual. Conditions that may determine if aresource falls into the respective category are specified below.

Class may be any resource which is of type rdfs:Class, but not of anyother type. Classes in RDF(S) ontologies can be mapped to correspondingEClasses. The class hierarchy can be maintained by mapping therdfs:subClassOf property to the eSuperTypes reference in EClass.

The class hierarchy might contain classes which are of no interest tothe software engineer, and which he might not want to retain in hisEcore model. In order to enable him to repeatedly apply thetransformation without having to erase the respective classes each timeby hand, the engineer can specify for each class if he wants to retainthis class for transformation or not. If he decides to omit a class, allits subclasses will not be transformed either. This is true as well forindividuals which are members of one or more of the omitted classes, andfor properties whose range or domain class is omitted.

As mentioned above, RDF(S) does not provide a common superclass for allclasses, in contrast to OWL (owl:Thing). For several reasons which aredescribed in the respective sections below, such a common top-levelclass may be introduced for the transformation. In analogy to OWL, thisclass may be called rdfs2ecore:Thing.

In RDF(S), IRIs may be used to precisely identify resources andtherefore classes. No corresponding notion exists in Ecore. Elements ina model are, at best, identified by memory pointers or by GUIDs.

When an Ecore model is used to generate Java code, a combination of thename attribute of an EClass with the name attribute of the EPackagewhich contains the EClass may be used to form the fully qualified classname of the generated Java class. In Java, a class may thus beidentified by its fully qualified class name. An algorithm to map theURI of an XML namespace to the attributes of an EPackage and to a fullyqualified Java package name may be given. This algorithm can serve as adefault method for creation of EPackages within the transformationprocess, as long as the class in question is associated with anamespace. If no namespace is associated to the class, the necessaryEPackage attributes either have to be specified by the software engineerbeforehand or generated automatically.

As the above mentioned algorithm does not represent an injectivefunction, and as resources are not required to be part of any namespace,it is still desirable to maintain the original IRI elsewhere in theEcore model. The concept of annotations proposed by Ecore can be used toembed the IRI into an EClass. For a class ex:Pizza, this annotation maylook like this:

  Source = “http://www.sap.com/owl2ecore#EntityAnnotation” Key =“nsPrefix” Value = “ex” Key = “nsIRI” Value = “http://example.org#” Key= “LocalName” Value = “Pizza” Key = “IRI” Value =“http://example.org#Pizza”

A simplified algorithm for the transformation of classes may be asfollows:

-   -   1. Create an empty Ecore metamodel.    -   2. Create an instance of EClass for the common top-level class        and add it to the Ecore metamodel.    -   3. For each top class of the ontology's class hierarchy (i.e.,        the classes which have no superclasses), create an instance of        EClass and add it to the Ecore metamodel.    -   4. Add the common top-level class to the eSuperTypes reference        of all of the EClass instances corresponding to the top classes.    -   5. Do the following for each top class:        -   a) Create an EAnnotation containing the IRI of the current            class and add it to the instance of EClass.        -   b) Create an instance of EClass for each of the current            class's subclasses and add them to the model. If an instance            of EClass for a subclass does already exist in the Ecore            metamodel, use this instance rather than creating a new one.        -   c) Add the current class to the eSuperTypes reference of all            of the EClass instances corresponding to its subclasses.        -   d) Repeat steps 5a to 5d for all of the current class's            subclasses.

Property may be any resource which is of type rdfs:Property, but not ofany other type. Properties in RDF(S) may be used to express relationsbetween resources. The corresponding modeling construct in Ecore areStructural Features, namely EAttribute and EReference. While propertiesare first-class citizens in the RDF(S) world, i.e., they can exist ontheir own without being attached to a class, structural features inEcore are always contained by an EClass.

In order to transform a property, we may determine an EClass as target,to which we can attach the structural feature corresponding to theproperty in question. For properties which are restricted to a certaindomain, this EClass can be derived from this restriction:

-   -   If the domain of the property is restricted to exactly one        class, the EClass corresponding to this class can be used as the        target.    -   If the domain of the property is composed of several classes, we        need to introduce a helper class which is a superclass of all        domain classes (and only of these). This helper class will then        be the target for the structural feature.

If no domain restriction exists for the property in question, the domainof the property may be the set of all classes, which in OWL ismanifested by the class owl:Thing, the supertype of all classes. TheEClass corresponding to owl:Class may be used as target for propertieswithout domain restriction. In RDF(S) however, no class which is thesuperclass of all classes exists. For the purpose of transformingproperties without this type of restriction (and other purposes, seebelow), a helper class may be introduced into the Ecore model similar tothe Ecore expression of owl:Thing and should hence be calledrdfs2ecore:Thing. The structural feature is consequently added to thisEClass.

In contrast to OWL, RDF(S) does not distinguish between objectproperties and data properties. This renders a direct mapping toEReference and EAttribute impossible. While in OWL object properties areused to link individuals to individuals and data properties are used tolink individuals to data values, properties in RDF(S) always linkindividuals to individuals, as all literal values (i.e., data values)are considered to be instances of rdfs:Datatype (which is itself asubtype of rdfs:Class) and hence individuals.

To be able to determine whether a property should be transformed into anEReference or an EAttribute, the range specification for the resp.property has to be taken into account. If the range comprises onlyinstances of rdfs:Datatype, an EAttribute may be used. The datatype ofthe EAttribute may be determined as follows:

-   -   If the range consists of exactly one datatype, the corresponding        Ecore datatype may be chosen. The details of datatype mapping        are discussed below.    -   If the range consists of several instances of multiple distinct        datatypes, the datatype may be set to EString, and all values of        the corresponding property may be transformed as character        strings without type interpretation.        In all other cases, an EReference may be used. The type of the        EReference may be determined as follows:    -   If the range is restricted to exactly one class, the EClass        corresponding to this class may be used as the eReferenceType of        the EReference.    -   If the range of the property is composed of several classes, a        helper class which is a subclass of all range classes (and only        of these) may be introduced. This helper class may then be used        as the eReferenceType of the EReference.    -   If no range restriction exists, the Ecore class Thing may serve        as the eReferenceType of the EReference.

A simplified algorithm for the transformation of properties may be asfollows:

-   -   1. Iterate over all properties and determine the necessary        helper classes:        -   For all properties which have multiple classes as domain, a            helper class which is a subclass of all domain classes may            be introduced into the ontology.        -   For all properties which have multiple classes as range, a            helper class which is a subclass of all range classes may be            introduced into the ontology.        -   Every domain and range consists of exactly one class now            (except for properties which have one or more datatypes as            range).    -   2. Transform the ontology's class hierarchy.    -   3. Iterate over all properties:        -   Retrieve the EClass instance corresponding to the            properties' domain from the Ecore metamodel.        -   Create an EReference for all properties which have a class            as range and add it to the eStructuralFeatures container of            to the EClass instance corresponding to the domain class.            The type of this EReference may be the EClass instance            corresponding to the range class.        -   Create an EAttribute for all properties which have one or            more datatypes as range and add it to the            eStructuralFeatures container of to the EClass instance            corresponding to the domain class. If the range consists of            exactly one datatype, the type of this EAttribute may be the            Ecore counterpart of this datatype; in any other case, the            type may be EString.

Individual may be any resource which is of any other type thanrdfs:Property or rdfs:Class. A similar concept of instances of classes(or individuals) exists in both worlds, RDF(S) and Ecore. However,several differences emerge when looking at the details.

As noted above, IRIs may be used in RDF(S) to identify resources. Thus,with the exception of blank nodes, all individuals in RDF(S) may beassociated to such an IRI. In Ecore, instances are merely objects in theterms of object-oriented programming and are exclusively identified bytheir memory address. In contrast to classes, they have no correspondingmeta-modeling construct which could be subject to annotations. In orderto retain the information incorporated by the IRI, special EAttributesmay be added to every class, i.e., to the common superclassrdfs2ecore:Thing which was introduced above. The values for theseattributes can be retrieved analogously to the method for classes asdescribed above.

RDF(S) allows multiple class membership for individuals, even if theseclasses are not in a sub- or super-class relationship. This is per senot possible in Ecore. An object in Ecore can only be an instance of twoor more classes: 1.) if these classes are in a sub- or super-classrelationship, or 2.) if the object is at the same time an instance of aclass which is, by means of multiple inheritance, a subclass of allclasses in question. In order to be able to transform individuals wherenone of these conditions are met, the class hierarchy may be enhanced byadding helper classes which fulfill the second condition. The respectiveindividuals can then be transformed to instances of this helper class inEcore.

A way to determine which helper classes are needed and at which locationin the class hierarchy they have to be inserted may comprise anequivalence relation on the set of individuals being defined, and asubgraph of the inheritance graph (i.e. the class hierarchy) for eachresulting equivalence class being constructed by determining theso-called membership classes. The helper classes may then be defined asa subclass of the bottom classes of each subgraph. The bottom classes ofan inheritance graph may be the classes whose indegree in the directedsubgraph is 0, i.e., the classes which do not have subclassesthemselves.

This method can be applied to the transformation from RDF(S) to Ecore aswell. The following improvement may be employed: If any helper classwhich was introduced as described above has an outdegree of exactly 1 inthe directed subgraph (i.e., it has only one superclass), it can beomitted and instances in the equivalence class associated to this helperclass can be transformed as instances of the corresponding superclass.FIG. 9 illustrates an improved helper class generation 900, inaccordance with an example embodiment.

In the transformation, the software engineer can decide for every helperclass if he prefers not to add it to the ontology, in which case theaffected individuals cannot be transformed to Ecore.

A simplified algorithm for the transformation of individuals may be asfollows:

-   -   1. Iterate over all individuals and insert the necessary helper        classes into the ontology.    -   2. Transform the ontology's class hierarchy.    -   3. Transform the properties of the ontology.    -   4. Create an empty Ecore model.    -   5. Iterate over all individuals:        -   a) Retrieve the EClass instance corresponding to the            individual's type from the Ecore metamodel.        -   b) Obtain an EObject instance for this individual by            instantiating the EClass instance retrieved in step 5a; add            it to the Ecore model (not the metamodel).        -   c) Iterate over all the properties in the ontology whose            subject is the current individual and retrieve the Ecore            counterpart of all objects of these properties either from            the Ecore model or as an instance of an Ecore datatype. Set            the value of the EStructuralFeature corresponding to the            property accordingly; skip, if the object is an individual            whose counterpart is not yet in model.        -   d) Iterate over all the properties in the ontology whose            object is the current individual and retrieve the Ecore            counterpart of all subjects of these properties from the            Ecore model. Set the value of the subject's            EStructuralFeature corresponding to the property            accordingly.

A resource may be considered to be a complex resource if it is used inthe RDF(S) ontology as any combination of class, property or instance.Conditions which may determine if a resource falls into the respectivecategory are specified below.

When transforming complex resources, as in the Ecore world, entities cannever be more than one of class, property or instance at the same time.Complex resource may therefore be mapped to distinct representations ofthese concepts in Ecore. The transformation may be able to provide alink between these representations in order to preserve as muchinformation available in the ontology as possible.

As shown above, the following representations may exist:

-   -   A class is represented by an instance of EClass.    -   A property is represented either by an EReference or by an        EAttribute.    -   An individual is represented by an instance of an instance of        EClass.

If a resource which is a combination of one of the above types is aboutto be transformed, the software engineer can choose to omit one or moreof the representations. For example, if a resource is used as a classand as an instance throughout the ontology, the software engineer canchoose to only create a representation for the class aspect of theresource.

If multiple representations are chosen, the software engineer can decidethat a kind of link should be established between the representations.The characteristics of the link may depend on the selectedrepresentations and are detailed below.

Class and Individual may be any resource which is of type rdfs:Class andat least of one other type except rdfs:Property at the same time. Aresource may be used as both a class and an individual, as shown in FIG.10, which illustrates an RDF graph 1000 showing a resource being used asboth a class and an individual, in accordance with an exampleembodiment, and as follows:

-   -   ex:Margherita rdf:type ex:Pizza.    -   ex:aMargherita rdf:type ex:Margherita.        Here, ex:Margherita is used as type of ex:aMargherita, and is        thus of type rdfs:Class. ex:Margherita is of type ex:Pizza, and        is therefore an individual.

If a resource is used as both, class and individual, either theindividual representation, the class representation or both can beomitted. In the case of partial omission, the remaining representationcan be transformed according to the process described above. If bothrepresentations are omitted, the resource will not be transformed atall.

If both representations are retained, the resource may first betransformed separately as a class (e.g., as class Margherita, aninstance of EClass) and subsequently as an instance of a class (e.g., asan instance of class Pizza, which is itself an instance of EClass). Inorder to maintain the information that multiple representations for oneand the same resource were created, the following EAnnotation may beadded to the class representation:

  Source = “http://www.sap.com/rdfs2ecore#individualRepresentation” Key= “nameOfIndividual” Value = “Margherita” Key =“namespacePrefixOfIndividual” Value = “ex”If OCL is enabled for the transformation of this entity, the followingentry may be added to the annotation:

  Key = “OCL” Value = rdfs2ecore::Thing.allInstances( )->select(t :rdfs2ecore::  Thing | t.nameOfIndividual = “Margherita” and t. namespacePrefixOfIndividual = “ex”)The OCL query code above can be retrieved from the annotation andsubsequently executed by the software engineer. It may return the actualobject which represents the instance. EMF may provide support for thisin the generated model editor for manual execution, as well as forprogrammatic execution in the application using the generated modelcode.

A simplified algorithm for the transformation of resources in thiscategory may be as follows:

-   -   1. Create EClass for the class representation.    -   2. Annotate EClass created in step 1 with the references to the        individual representation.    -   3. Obtain EClass corresponding to the type of the individual        representation.    -   4. Create instance of the EClass retrieved in step 3.

Class and Property may be any resource which is of type rdfs:Class andof type rdfs:Property, but not of any other type at the same time. Aresource may be used as both a class and a property, as shown in FIG.11, which illustrates an RDF graph 1100 showing a resource being used asboth a class and a property in accordance with an example embodiment,and as follows:

-   -   ex:makesPizza rdf:type rdf:Property.    -   ex:makesPizza rdfs:domain ex:PizzaBaker.    -   ex:makesPizza rdfs:range ex:Pizza.    -   ex:margheritaRecipe rdf:type ex:makesPizza.        Here, ex:makesPizza is used as type of ex:margheritaRecipe, and        is thus of type rdfs:Class. ex:makesPizza is of type        rdf:Property, and is therefore a property.

If a resource is used as both a class and a property, either theproperty representation, the class representation, or both can beomitted. In the case of partial omission, the remaining representationcan be transformed according to the process described above. If bothrepresentations are omitted, the resource will not be transformed atall.

If both representations are retained, the resource may first betransformed separately as a class and as a property. The class mayconsequently be represented by an EClass, the property by anEStructuralFeature; the name of the resp. EStructuralFeature, as well asthe name of its container class and the name of the container class'spackage, are stored as an EAnnotation to the EClass of the classrepresentation:

  Key = “featureName” Value = “makesPizza” Key = “className” Value =“PizzaBaker” Key = “packageName” Value = “ex”In analogy, an EAnnotation may be added to the EStructuralFeaturerepresenting the property:

  Source = “http://www.sap.com/rdfs2ecore#classRepresentation” Key =“className” Value = “makesPizza” Key = “packageName” Value = “ex”

A simplified algorithm for the transformation of resources in thiscategory may be as follows:

-   -   1. Create EClass for the class representation.    -   2. Annotate EClass created in step 1 with the references to the        property representation.    -   3. Create EStructuralFeature and add it to the EClass        corresponding to the domain of the property representation.        -   Annotate EStructuralFeature created in step 3 with the            references to the class representation.

Property and Individual may be any resource which is of typerdfs:Property and at least of one other type except rdfs:Class at thesame time. FIG. 12 illustrates an RDF graph 1200 showing a resourcebeing used as both a property and an individual in accordance with anexample embodiment, and as follows:

  ex:makesPizza rdf:type ex:FoodPreparation ex:makesPizza rdf:typerdf:Property ex:makesPizza rdfs:domain ex:PizzaBaker ex:makesPizzardfs:range ex:PizzaHere, ex:makesPizza is of type rdf:Property, and is therefore aproperty. ex:makesPizza is of type ex:FoodPreparation, and is thereforean individual.

If a resource is used as a property and as an instance of a class, anyof these representations can be omitted. If either only the propertyrepresentation or the individual representation is retained, thetransformation can be performed according to the process described abovefor properties, i.e., individuals.

If both the property representation and the individual representationare retained, the resource may first be transformed separately as aproperty and as an individual, which results in an EStructuralFeature asa representation of the property and an instance of a class (whichitself is an instance of an EClass). To establish the link between theserepresentations, an EAnnotation may be added to the EStructuralFeature:

  Source = “http://www.sap.com/rdfs2ecore#individualRepresentation” Key= “nameOfIndividual” Value = “makesPizza” Key =“namespacePrefixOfIndividual” Value = “ex”If OCL is enabled for the transformation of this entity, the followingentry may be added to the annotation:

  Key = “OCL” Value = rdfs2ecore::Thing.allInstances( )->select(t :rdfs2ecore::  Thing | t.nameOfIndividual = “makesPizza” and t. namespacePrefixOfIndividual = “ex”)The above OCL query code can be retrieved and executed by the softwareengineer in order to get the actual object which represents theinstance.

A simplified algorithm for the transformation of resources in thiscategory may be as follows:

-   -   1. Create EStructuralFeature and add it to the EClass        corresponding to the domain of the property representation.    -   2. Annotate EStructuralFeature created in step 1 with the        references to the individual representation.    -   3. Obtain EClass corresponding to the type of the individual        representation.    -   4. Create instance of the EClass retrieved in step 3.

Class, Property and Individual may be any resource which is of typerdfs:Class, of type rdfs:Property and at least of one other type at thesame time. FIG. 13 illustrates an RDF graph 1300 showing a resourcebeing used as both a class, a property, and an individual in accordancewith an example embodiment, and as follows:

ex:makesPizza rdf:type ex:FoodPreparation ex:makesPizza rdf:typerdf:Property ex:makesPizza rdfs:domain ex:PizzaBaker ex:makesPizzardfs:range ex:Pizza ex:margheritaRecipe rdf:type ex:makesPizzaHere, ex:makesPizza is used as type of ex:margheritaRecipe, and is thusof type rdfs:Class. ex:makesPizza is of type rdf:Property, and istherefore a property. ex:makesPizza is of type ex:FoodPreparation, andis therefore an individual.

If a resource is used as all three, class, property and instance, eitherone can be omitted. In the case of omission, the remainingrepresentation can be transformed according to the process describedabove. If all three representations are retained, the links betweenthese representations can be established pair wise as described in theparagraphs above.

A simplified algorithm for the transformation of resources in thiscategory may be as follows:

-   -   1. Create EClass for the class representation.    -   2. Annotate EClass created in step 1 with the references to the        property representation.    -   3. Annotate EClass created in step 1 with the references to the        individual representation.    -   4. Create EStructuralFeature and add it to the EClass        corresponding to the domain of the property representation.    -   5. Annotate EStructuralFeature created in step 4 with the        references to the class representation.    -   6. Annotate EStructuralFeature created in step 4 with the        references to the individual representation.    -   7. Obtain EClass corresponding to the type of the individual        representation.    -   8. Create instance of the EClass retrieved in step 7.

In RDF(S) data values may be represented by the means of literals. Thevalue of such a literal may be described by a sequence of characters.RDF(S) allows untyped and typed literal values. The specification of adatatype for a literal can be used when interpreting this value, e.g.,as a number, a date or a text string. A datatype may be specified by aURI, which refers to a datatype definition. Datatypes can be definedwith the XML Schema Definition Language (XSD). It is up to theapplication which processes an RDF(S) document to figure out how tohandle the given datatype. Hence, the W3C suggest the use of thepredefined XML Schema datatypes.

The only predefined RDF datatype is rdf:XMLLiteral. This datatype isused to allow embedding XML content as literal values into XML ontologydocuments without this content being interpreted as being RDF(S).

In the transformation, the predefined XML Schema datatypes can be mappedto corresponding built-in EDataType. As untyped and typed literals aregiven as text strings in an RDF(S) document, we can transform everyuntyped literal and literals whose type is not one of the predefined XMLSchema datatypes to the Ecore datatype EString.

Besides the basic modeling features discussed in the above sections,RDF(S) provides primitives to model more complex data structures, viz.containers, collections and nested propositions. The transformationdetails of these primitives are introduced in this section.

RDF(S) features several modeling primitives to describe groups of thingsand structures that resemble lists. These primitives allow theconstruction of groups in two distinct ways, either with containersand/or with collections.

A container in the RDF(S) context may be a group of objects, which canalways be extended with further elements via the addition of RDF(S)triples. However, there is no way to express that this group is closedand complete. A container can thus be considered to be an open list.

The RDF equivalent of a closed list is a collection. Once a container isinitially defined, it is impossible to append further elements just byadding new RDF(S) triples. This allows expressing that a list containsall possible entries and is thus complete.

In both cases, the goal is to model a relation between one subject tomultiple objects. It should be noted that both concepts are notintroducing new expressivity to what can already be expressed viaindividual RDF(S) triples, but rather are “syntactic sugar” and allowfor more concise serializations. Consequently, all occurrences of theseconcepts can be mapped to EAttributes and EReferences with cardinality1..* in the Ecore model as described above. However, these constructsprovide a unified way to represent lists by the use of standard classesand identifiers instead of specific, customized solutions usingindividual triples. While this fact doesn't have any semantic impact(i.e., an ordered list is an ordered list, even if it is not expressedin a standard way), certain additional information can be automaticallyextracted and used for the transformation to Ecore.

The following types of containers may be provided by RDF(S):

-   -   Bag (a resource of type rdf:Bag)    -   Sequence (rdf:Seq)    -   Alternative (rdf:Alt)        These predefined RDF types enable the ontologist to specify his        (informal) intention about how a group of resources or literals        should be interpreted in a given application, but they have no        influence on the RDF graph structure and carry no formal        semantics. The W3C proposes the following interpretations:    -   A Bag represents a group of resources or literals without any        relevance of the order of its members. It may contain duplicate        members.    -   A Sequence represents a group of resources or literals which are        arranged in an ordered sequence, and which may contain duplicate        members as well. A sequence can thus be seen as an ordered list.    -   An Alternative represents a group of resources or literals which        are to be interpreted as equivalent alternatives.

As each of these cases differ in regards to the interpretation of theorder of a group's members, as well as the occurrence of duplicatemembers, we can use these interpretations to refine the EAttribute orEReference corresponding to the one-to-many relation which are modeledby the container in question. EAttribute and EReference are bothsubclasses of EStructuralFeature, and as such have both the propertiesordered and unique. Ordered specifies whether the order of values issignificant, and unique specifies whether duplicate elements areallowed.

For Bag, both ordered and unique are set to false, as the order of themembers is of no significance and it may contain duplicate members. ForSequence, ordered is set to true, but unique is set to false, as theorder is of relevance, while duplicate members may occur. ForAlternative, ordered is set to false, while unique is set to true. Asall alternatives are equivalent, order is of no relevance, andduplicates make no sense in this context.

RDF collections are based on the principle of a Linked List, i.e., everynon-empty list can be split into the first element and the rest of thelist. The rest of the list can either be split in this way as well, orit is an empty list, i.e., the “end” of the list. RDF provides theproperties rdf:first and rdf:rest, as well as a predefined resource withthe URI rdf:nil for the purpose of constructing an RDF collection. As itis not possible to append new elements at the end of the list by addingtriples without introducing inconsistencies, this type of list isconsidered to closed.

The closedness of a list is of importance in regards to the Open WorldAssumption. As RDF(S) is based on this assumption, it is necessary to beable to express that a collection comprises all possible elements andthat outside this collection, no further possible elements exist. Thedistinction between open and closed list is significant when reasoningover RDF(S) ontologies. In Ecore, on the other hand, reasoning is of norelevance. Furthermore, a closed world is assumed in the Ecore context,i.e., at any point in time, the list is assumed to be closed. Thus, theonly additional information that we can exploit for the transformationis that for the resulting EStructuralFeature, ordered has to be set totrue, and unique to false.

While RDF(S) does not allow to make statements about other statements(i.e., the object of a triple is again a triple), it provides thepredefined properties rdf:subject, rdf:predicate, rdf:object and thepredefined class rdfs:Statement as a workaround for this limitation. Thestatements constructed by this means are “propositions”, with nosemantic impact, i.e., no assertion is done by such statements. Bydefinition, the referenced subjects, predicates and objects areresources in the ontology. As these resources might very well beproperties (this is to be expected especially in the case of thepredicate), there is no way to transform these propositions by applyingthe above described transformation process, as this would requireproperties as first-class citizens. As a workaround we propose thefollowing solution: When such propositions occur in an ontology, a classrdfs2ecore:Statement is created in the Ecore model. This class containsthe EAttributes subject, predicate and object of type EString withcardinality=1. For every proposition, an instance of this class may becreated, and the values of the EAttributes may be set to the accordingIRI. This mechanism is optional; the software engineer can choose toignore these propositions.

Additionally, in our transformation, the software engineer can decide toconvert a proposition to an assertion, i.e., adding the predicate as anEStructuralFeature to the class representation of the subject andsetting the value according to the object.

RDF(S) provides a set of predefined property names, by means of whichadditional information can be attached to resources in an RDF(S)document. This additional information has no semantic impact, but issupposed to provide further information in a human-readable way.

rdfs:label may be used to attach a label to a resource, which can thenbe used, e.g., to be displayed instead of the resource's less readableURI when visualizing the RDF document as a graph; rdfs:comment allows toassign human-readable comments to resources; rdfs:seeAlso andrdfs:isDefinedBy can be used to link one resource to other resourcesthat might provide further information about the subject resource.

The range of rdfs:label and rdfs:comment is rdfs:Literal; the range ofrdfs:seeAlso and rdfs:isDefinedBy is rdfs:Resource; as rdfs:Resource canbe represented by an URI, all four values can be put into characterstrings on the Ecore side.

The additional information attached to an rdfs:Resource may therefore betransformed as follows:

-   -   To the class and property representations (which are of type        EClass and EStructuralFeature) of a resource (if such a        representations are required) we may add the EAnnotation:

  Source = “http://www.sap.com/sw2ecore#ontologyAnnotations” Key =“label_<i>” // with i ε 1..n Value = ... // the value of the i-thrdfs:label property for this resource Key = “comment_<i>” // with i ε1..n Value = ... // the value of the i-th rdfs:comment property for thisresource Key = “seeAlso” Value = ... // the values of the rdfs:seeAlsoproperty for this resource as URIs, separated by spaces Key =“isDefinedBy” Value = ... // the values of the rdfs:isDefinedBy propertyfor this resource as URIs, separated by spacesAs rdfs:isDefinedBy is meant to be a subproperty of rdfs:seeAlso, thevalues of rdfs:seeAlso may contain all the values of rdfs:isDefinedBy.

-   -   The representation of instances in Ecore is not part of the        modeling concepts; they are merely instances of instances of an        EClass in Ecore. As such, there is no predefined way to attach        annotations to them like the above mentioned EAnnotations for        class and property representations. To circumvent this        restriction, we may add an unbounded EAttribute        “additionalInformation” of type EStringToStringMapEntry to the        common superclass Thing. We can then add the following        key-value-pairs to this EAttribute (analogously to the        EAnnotation specified above):

  Key = “label_<i>” // with i ε 1..n Value = ... // the value of thei-th rdfs:label property for this resource Key = “comment_<i>” // with iε 1..n Value = ... // the value of the i-th rdfs:comment property forthis resource Key = “seeAlso” Value = ... // the values of therdfs:seeAlso property for this resource as URIs, separated by spaces Key= “isDefinedBy” Value = ... // the values of the rdfs:isDefinedByproperty for this resource as URIs, separated by spaces

The present disclosure is also relevant to the transformation of OWLmodeling primitives to Ecore. One aim of the transformation from OWL toEcore is to be as adjustable as possible without burdening the softwareengineer with the need to delve into the details of OWL, descriptionlogic and reasoning. Another goal is to make the transformation processeasily repeatable, so changes to the original model, i.e., the ontology,do not entail a lot of manual adjustments on behalf of the softwareengineer. Hence, we propose to extend the original transformation fromOWL to Ecore with the possibility to exclude specific classes from thetransformation as specified by the software engineer.

As stated above for the transformation from RDF(S), the class hierarchyof an ontology might contain classes which are of no interest for themodel in the Ecore world. In order to enable the engineer to repeatedlyapply the transformation without having to erase the respective classeseach time by hand, with this extension, he can specify for each class ifhe wants to retain it for the transformation or not. If he decides toomit a class, all its subclasses will not be transformed either. Thisapplies as well for individuals which are members of one or more of theomitted classes, and for properties whose range or domain class isomitted.

OWL allows multiple class membership for individuals, even if theseclasses are not in a sub- or super-class relationship. As stated abovefor the transformation from RDF(S) to Ecore, this behavior is notsupported in Ecore, and renders the introduction of helper classesnecessary.

An equivalence relation on the set of individuals is defined, and asubgraph of the inheritance graph (i.e., the class hierarchy) for eachresulting equivalence class is constructed. This is used to determinethe number and the location of the necessary helper classes, which aresimply defined as a subclass of the bottom classes of each subgraph,with the term “bottom classes of a graph” referring to classes which donot have subclasses themselves.

We propose to apply the improvement introduced for the transformationfrom RDF(S) to Ecore as well to the transformation from OWL to Ecore.The improvement consists of exploiting the fact that when an inheritancesubgraph of an equivalence class has only one bottom class, theindividuals in question can be transformed directly to instances of thisbottom class, omitting no additional helper class.

When modeling relations between classes, e.g., individuals in OWL viaobject or data properties, it is possible that the modeler does notspecify the domain and/or the range of such a property. This may beintentional or due to negligence. In OWL, the domain and range for suchproperties is implicitly assumed to be owl:Thing. The OWL to Ecore(OWL2Ecore) transformation may therefore add the associated EReferenceto the EClass corresponding to owl:Thing, which, while formally correct,might not be the desired behavior even in the case of intentionalomission.

To circumvent this behavior, we propose an extension of the OWL2Ecoretransformation. In case that domain and/or range of a property isowl:Thing, the transformation can either be continued “as is” withoutmodification, or the classes for range and domain can be specified. Ifthe ABox is part of the transformation, the types of the individualsassociated with the property in question can be taken into account todetermine the type of domain and range:

-   -   domain and range can be set to the “lowest” common supertype of        the above types. If this is owl:Thing, nothing is done.    -   One of the common supertypes can be used. Again, if the only        available supertype is owl:Thing, no change is performed.    -   Alternatively, helper classes can be created. A helper class can        be generated as supertype of all concerned types. A helper class        can be generated as supertype of a subset of the concerned        types.

If the ABox is not part of the transformation, the classes for domainand range can be chosen freely. In addition, it is possible to specifymore than one domain and range pair; the property will then betransformed as multiple EStructuralFeatures (one for every pair).

However, this extension introduces several transformation problems dueto which the possibility to specify or deduce domain and range should beused with caution:

-   -   OCL may be used to preserve information on class membership        induced by so-called class descriptions. By bending containing        classes and types of EStructuralFeatures as described above,        domain and range given in these class description no longer        match the Ecore model and may render the generated OCL        constructs invalid. In this case, the information obtained from        the class descriptions will be lost, and the corresponding OCL        expressions will be discarded.    -   The integrity of the property hierarchy can no longer be        guaranteed. Again, this information will not be preserved in        this case.    -   If the above extension is used on pairwise-disjoint properties,        it is possible that the disjointedness cannot be maintained in        the Ecore model.    -   The same problem arises for properties which have an opposite        property. This quality may not be preserved, if domain and range        are not adjusted accordingly for both properties.

Same individuals (i.e., individuals whose equivalence can be inferred oris explicitly asserted) may be transformed as distinct instances oftheir associated types. The “sameness” of these instances was providedby a reference to all equivalent instances. While this is a perfectlyvalid way to preserve the information from the ontology, the resultingEcore model would be inefficient and difficult to handle:

-   -   Same individuals in an ontology share all qualities by        definition. Any modification of one individual affects every        other individual which is declared equivalent. In Ecore, objects        are different by default. For instance, they are allocated to        different memory addresses. Any change to one object would not        be reected in any other object. Ecore itself does not provide        any facilities to handle “same” objects. The same holds true for        OCL.    -   The only additional information provided by same individuals        lies in their IRI. This information is a concept which is        already foreign to the Ecore world. Creating distinct objects        has no reasonable advantage when this information could be        preserved in a much simpler and efficient way.        We propose the following solution:    -   For a group of same individuals, only one representative is        transformed, similar to the transformation of classes and        properties.    -   A multi-valued EAttribute of type EString is attached to the        common top-level class Thing. For each same individual, the IRI        of this individual is added as a value of this EAttribute.

Ecore offers functionality to validate models. In addition to theimprovements of the constraints themselves, we propose to use theconvention for validation delegates when embedding OCL constraints inEcore classes. The constraints will then be treated as invariants forthe annotated class. These invariants are verified each time modelvalidation is performed.

In OWL (as well as in RDF(S)), properties are first-order citizens thatform a hierarchy of binary relations. If an object property ex:hasUncleis a direct subproperty of an object property ex:hasRelative, every pairof individuals related by the object property ex:hasUncle is implicitlyrelated by the object property ex:hasRelative due to the fact thatex:hasUncle is a subproperty of ex:hasRelative. By annotating the Ecoreclass Person (in package ex) corresponding to the domain of the propertyex:hasUncle with the following OCL constraint, it is possible to verifyif the above conditions regarding the property hierarchy are met by thecurrent state of the Ecore model when validating the model.

  ex : : Person . allInstances ( )->forAll ( a | a . hasRelative->includesAll ( a . hasUncle ) )This applies to datatype properties as well. Given a datatype propertypair ex:spouseName and ex:partnerName where ex:spouseName is directsubproperty of ex:partnerName, every literal connected to an individualby ex:spouseName is implicitly also connected to the same individual byex:partnerName. This can be expressed by the following OCL constraint.

  ex : : Person . allInstances ( )->forAll ( a | a . partnerName->includesAll ( a . spouseName ) )

In OWL, it is possible to make statements about the set of members of aclass in several ways, viz. by enumeration of every member of the classin question, by restricting membership to individuals fulfilling certainconditions regarding one or more given properties or by applying setoperations on the set of members of existing classes. Again, we can useOCL invariants to preserve the information induced by these so-calledclass descriptions.

The following assumption is true for most property restrictions:

-   -   Let us assume the property P with the domain class D to be        restricted on the class A. Thus, A automatically becomes        subclass of D through inference of the reasoner. After the        transformation to an Ecore model, class A would already own an        EReference P through inheritance from class D. In conclusion, it        is necessary and sufficient to use OCL invariants attached to        class A in the Ecore world to handle local restrictions.

However, there are cases of property restrictions, where A does notautomatically become subclass of D. In the following OCL examples, thesecases are noted.

  AllValuesFrom with A=Person and P=hasPet: ObjectAllValuesFrom(a:hasPet a:Dog ) Person . allInstances ( )->forAll (a | i f a .oclIsKindOf (PetOwner) then ( a . oclAsType (PetOwner ) . hasPet->asSe t( )-> forAll (b | b . oclIsKindOf (Dog) ) ) else true endif )

In the case of AllValuesFrom, A is not classified as subclass of D bythe reasoner, because A requires members to have either a dog or no petat all. Individuals who have no pet at all are not necessarily membersof D, so in the Ecore model, their corresponding classes would not ownan EReference P. Because of this, members of A have to be have to bechecked for their membership in D and cast to D when the check turns outpositive. In OCL, this is achieved via the predefined functionsoclIsKindOf and oclAsType.

  SomeValuesFrom with A=Person and P=fatherOf : ObjectSomeValuesFrom(a:fatherOf a:Man ) Person . allInstances ( )->forAll ( a | a .fatherOf->asSe t ( )-> exists (b | b . oclIsKindOf (Man) ) ) HasValuewith A=AlexandersChildren and P=hasFather : ObjectHasValue(a:hasFatherAlexander) AlexandersChildren . allInstances ( )-> collect ( x | x .hasFather )-> exists ( x | x . nameOfIndividual = ′ Alexander ′ )HasSelf with A=AutoRegulatingProcess and P=regulate:SubClassOf(:AutoRegulatingProcess ObjectHasSelf(a:regulate))AutoRegulatingProcess . allInstances ( )-> forAll ( x | x .regulate->asSet ( )->includes ( x ) )

Similar to AllValuesFrom, MaxCardinality allows members with no parentat all, so the corresponding classes in the Ecore model might not ownthe EReference corresponding to P.

  MaxCardinality with A=Person, P=hasParent and D=PersonWithRelatives:ObjectMaxCardinality( 2 a:hasParent ) Person . allInstances ( )->forAll( a | if a . oclIsKindOf ( PersonWithRelatives ) then a . oclAsType (PersonWithRelatives ) . hasParent-> asSet ( )->size ( )<=2 else trueendif )This is not the case for the MinCardinality restriction.

  MinCardinality with A=Person, P=hasNationality and D=Citizen:ObjectMinCardinality(1 a: hasNationality) people : : Person .allInstances ( )->forAll ( a | a . hasNationality-> asSet ( )->size ()>=1)

An OWL class can be described by the means of union, intersection orcomplement of the set of members of other OWL classes.

UnionOf (in conjunction with AllValuesFrom) with A=Person, P=hasRelativeand D=PersonWithRelatives: ObjectAllValuesFrom( a:hasRelativeObjectUnionOf( a:Woman a:Man)) Person . allInstances ( )->forAll ( a |if a . oclIsKindOf ( PersonWithRelatives ) then ( a . oclAsType (PersonWithRelatives ) . hasRelative->asSet ( )-> forAll (b | b .oclIsKindOf (Woman) or b . oclIsKindOf (Man) ) else true endif )IntersectionOf and ComplementOf (in conjunction with AllValuesFrom) withA=Person, P=hasYoungSister and D=PersonWithRelatives:ObjectAllValuesFrom( a:hasYoungSister ObjectIntersectionOf( a: WomanObjectComplementOf( a:AdultWoman)) Person . allInstances ( )->forAll ( a| if a . oclIsKindOf ( PersonWithRelatives ) then ( a . oclAsType (PersonWithRelatives ) . hasYoungSister-> asSet ( )->forAll (b | b .oclIsKindOf (Woman) and not b . oclIsKindOf (AdultWoman) ) else trueendif )

An OWL class can be described by explicitly specifying every member ofthe class.

  OneOf with A=Wine and P=hasColour:ObjectAllValuesFrom(a:hasColourObjectOneOf(a:White a:Red)) Wine .allInstances ( )->collect ( x | x . hasColour )->forAll (y | y .nameOfIndividual=′ white ′ or y . nameOfIndividual=′ red ′ )

Several “qualities” can be assigned to properties in OWL. The semanticsof these so-called property characteristics can again be preserved inEcore by using OCL invariants.

Functional and Inverse Functional Properties

If an object property P is functional, for each individual x, there canbe at most one distinct individual y such that x is connected by P to y;if an object property P is inverse-functional, for each individual x,there can be at most one individual y such that y is connected by P withx.

  Functional Property with P=hasParent, D=PersonWithRelativesFunctionalObjectProperty(a:hasFather) PersonWithRelatives . allInstances( )-> forAll ( a | a . hasFather->asSet ( )->size ( )<=1)InverseFunctionalProperty with P=fatherOf, D=PersonWithRelativesInverseFunctionalObjectProperty(a:fatherOf) PersonWithRelatives .allInstances ( )->forAll (x , y | x . fatherOf->excludesAll ( y .fatherOf->asSet ( ) ) )

Symmetric and Asymmetric Object Properties

If an object property P is symmetric, for every pair of individuals xand y, if x is connected to y by P, y is also connected to x by P; if anobject property P is asymmetric, for every pair of individuals x and y,if x is connected to y by P, y cannot be connected to x by P.

  Symmetric Property with P=hasFriend, D=PersonWithFriendsSymmetricObjectProperty(a:hasFriend) PersonWithFriends . allInstances ()-> forAll (x , y | x . hasFriend->includes ( y ) implies y .hasFriend->includes ( x ) ) Asymmetric Property with P=fatherOf,D=Person AsymmetricObjectProperty(a:fatherOf) Person . allInstances ()->forAll (x , y | x . fatherOf->includes ( y ) implies y .fatherOf->exclude s ( x ) )

Transitive Object Properties

If an object property P is transitive, for every triple of individualsx, y and z, if x is connected to y by P, and y is connected to z by P,then x is also connected to z by P.

  Transitive Property with P=ancestorOf, D=PersonWithDescendants,R=Person TransitiveObjectProperty(a:ancestorOf) PersonWithDescendants .allInstances ( )-> forAll ( x | PersonWithDescendants . allInstances ()-> forAll ( y | Person . allInstances ( )-> forAll ( z | x .ancestorOf->includes ( y ) and y . ancestorOf->includes ( z ) implies x. ancestorOf->includes ( z ) ) ) )

Reflexive and Irreflexive Object Properties

  OWL Assertion: ReexiveObjectProperty(a:anyProperty) A. allInstances ()->forAll ( x | x . anyProperty->includes ( x ) ) OWL Assertion:IrreexiveObjectProperty(a:anyProperty) A. allInstances ( )->forAll ( x |x . anyProperty->excludes ( x ) )

Disjoint Properties

If two properties P₁ and P₂ are declared to be disjoint, an individual xcannot be connected to a distinct individual y by both properties P₁ andP₂ at the same time.

  Disjoint Properties with P₁=hasFather, P₂=hasMother, D₁=Person,D₂=Person DisjointObjectProperties( a:hasFather a:hasMother ) Person .allInstances ( )->forAll ( a | a . hasFather-> excludesAll ( a .hasMother->asSet ( ) ) )

Several further axioms regarding properties exist in OWL that can beexpressed in Ecore via OCL invariants. In the following paragraphs,comprehensive examples for these invariants are given.

Property Chains

Properties can be defined as a composition of other properties by meansof so-called property chains. By defining an object property P as thechain of object properties P_(i) (iε1 . . . n), we state that anyindividual x connected with an individual y by this chain of objectproperties is necessary connected with y by the object property P. FIG.14 illustrates the definition of property P by means of a propertychain, in accordance with an example embodiment.

Property Chain with property P, domain A of P, properties P_(i) in chain(i ε 1..n), domain A_(i) of P_(i), range Ri of Pi ObjectPropertyChain(P1 ... Pn ) A. allInstances ( )->forAll ( a1 | D1 . allInstances ( )->forAll ( a2 | D2 . allInstances ( )->forAll ( . . . Dn . allInstances ()->forAll ( an | Rn . allInstances ( )-> forAll ( an+1 | a1.P1->includes ( a2 ) and a2 .P2->includes ( a3 ) and . . . an.Pn->includes ( an+1) implies a1 .P->includes ( an+1 ) ) . . . ) )

Keys

Keys allow to specify that named instances of a class are uniquelyidentified by the value of one or more given properties, i.e., if theinstances have the same value for each key property, then theseinstances must be identical.

  HasKey with A=Person, P=hasSSN HasKey( a:Person a:hasSSN ) Person .allInstances ( )->forAll (x , y | x . hasSSN-> excludesAll ( y .hasSSN->asSet ( ) ) )

Negative Property Assertion

A negative property assertion states that a specific individual is notconnected to another specific individual or a specific literal by thegiven property. This is important in regards to the open worldassumption of OWL, as otherwise the question if an individual isconnected to another individual or literal by the property in questioncould not be answered with “no” even if no positive property assertionexists.

  Negative Property Assertion with A=Man, P=hasWifeNegativeObjectPropertyAssertion( a:hasWife a:Bill a:Mary ) Man.allInstances ( )-> forAll ( x | x . NameOfIndividual=′ Bi ll ′ implies x. hasWife->asSet ( )-> forAll ( y | y . NameOfIndividual< >′Mary ′ ) )

When modeling an ontology, individuals are often not declareddifferentFrom, sometimes even if the ontologist thinks of them asdifferent, but does not explicitly assert the difference of theseindividuals. This may be due to negligence, but as the explicitassertion for every pair of individuals is a tedious task, it may justnot be feasible for ontologies with a large amount of individuals. Whentransforming these individuals, they automatically become “different”objects in Ecore, but this may still prove to be a problem, as theinformation about the difference is not taken into consideration whenperforming reasoning on an ontology, i.e., when materializing implicitknowledge before the actual transformation. As a workaround, we proposethe possibility to set all individuals as pair-wise different before thematerialization of implicit knowledge, except those individuals whichare asserted as equivalents of other individuals.

The implementation of the transformation of a Semantic Web ontology intoa software meta-model and model is discussed below. The ontologytransformation module 620 may be implemented as a plug-in for theEclipse Platform. The Eclipse platform forms the base of Ecore. FIG. 15illustrates a simplified plug-in dependency diagram 1500 of theimplementation, in accordance with an example embodiment.

The first implementation step may be the definition of a data model forthe configuration options of our transformation. To allow an adjustabletransformation, the model may be able to represent all possibleconfiguration needs, all the while not encapsulating application logicand thus losing flexibility. The capability to save transformationdecisions and to reapply these decisions on subsequent transformationsmay be achieved.

The data model may be created in Ecore by specifying the model using anXML Schema definition. This may be done for three reasons:

-   -   1. In order to use of EMF's persistence facilities with a        serialization format tailored to our needs.    -   2. Due to the code generation facilities provided by EMF, a        basic editor may be generated for our configuration files,        allowing for instant creation and modification of transformation        configurations.    -   3. Modifications and extensions of the configuration model are        inexpensive due to automated code regeneration and merging.        A wizard-driven graphical user-interface may be employed in        order to allow configuration of the most common use-cases. For a        more specific configuration, the auto-generated config file        editor can be used.

FIG. 16 illustrates a package dependency diagram 1600 of theimplementation, in accordance with an example embodiment. Theimplementation may be divided into several packages. Each of thesepackages may concentrate one specific aspect of the whole transformationprocess. The functionality provided by each of these packages isoutlined below.

FIG. 17 illustrates a package structure 1700 of an implementation, inaccordance with an example embodiment. In the base package, notableclasses are OWL2EcoreMain and OWL2EcoreTransformation. OWL2EcoreMainprovides a Java main method as well as the API to invoke the wholetransformation from other applications (or plug-ins like thewizard-driven user interface described below). It may invoke ontologypreparation, as well as the class OWL2EcoreTransformation. This classmay provide the frame for the actual transformation.

FIG. 18 illustrates the composition of a config package 1800, inaccordance with an example embodiment. The config package 1800 maycontain the data model of the transformation. This model may be used tohandle the configuration and the corresponding configuration files. Themodel may be an Ecore model and be specified via an XML Schema file. Inconsequence, this package may contain mainly auto-generated classes,except some classes in the util package and some manual modifications tothe Config interface and its implementation.

FIG. 19 illustrates the composition of an owl package 1900, inaccordance with an example embodiment. The owl package 1900 may containall functionality related to the preparation of the ontology for asubsequent transformation. In this package, the necessary helper classesfor anonymous classes, domains and ranges of properties and forindividuals may be identified and added to a copy of the ontology (ifnot configured otherwise). Also, implicit knowledge, i.e., knowledgewhich is only implicitly manifested in the ontology and accessible viareasoning, may be materialized by adding explicit statements to thecopied ontology.

Notable classes are OWLOntologyExtension, which is the package's mainclass and integrates the functionality of the other classes of thispackage to provide the behavior described above, and

OWLOuterAnonymousClassWalkerVisitor, which allows to identify “maximal”anonymous classes, i.e., classes which are not part of another, nestedanonymous class.

FIG. 20 illustrates the composition of an ecore package 2000, inaccordance with an example embodiment. The ecore package 2000 containsall the functionality related to the actual transformation. A roughoutline of the transformation process may be as follows:

-   -   1. The class hierarchy is traversed and the corresponding        classes are created in an Ecore (meta-)model via        OWLEcoreClassHierarchyTransformator.    -   2. The object and data property hierarchies are traversed and        the necessary attributes and references are created in        corresponding classes by the classes        OWLEcoreObjectPropertiesTransformator and        OWLEcoreDataPropertiesTransformator. The Ecore metamodel is        complete.    -   3. An iteration over the set of individuals is performed with        the class OWLEcoreIndividualTransformator, the corresponding        Ecore classes are instantiated and the references and attributes        set to the correct values.

Another notable class is OCLGenerator, which uses nested anonymous classexpressions as an abstract syntax tree for OCL constraint generation.

A wizard-driven graphical user interface may be provided for thetransformation from OWL to Ecore as a separate Eclipse plug-in.Impressions of the user interface and explanations of the user interfacecontrols are discussed below.

If the plug-in is installed correctly, a new item OWL2Ecore may beavailable in the main menu of the Eclipse IDE. The plug-in can bestarted by selecting this menu item and afterwards selecting Launch.

The first dialog which may be displayed to the user is an ontologyselection dialog. FIG. 21 illustrates a graphical user interface 2100for specifying an OWL ontology, in accordance with an exampleembodiment. An OWL Ontology File setting may allow the user to specify alocal file which contains the ontology. Ontologies that compose theimport closure of the selected ontology may be available either remotelyunder their IRI or locally in the same directory. An OWL Ontology IRIsetting may allow the user to specify an IRI under which the ontologycan be retrieved remotely. If the specified ontology is already a fullyextended ontology, e.g., when using intermediate ontology files fromprevious transformations, an OWL Ontology File from PreviousTransformation setting can be used to save time. In some embodiments, noontology preparation and extension (i.e., no ontology classification andno materialization of implicit knowledge) is performed in this case;instead, the transformation is performed immediately.

After having chosen the ontology which is to be transformed, either anew configuration file may be created or an existing one selected. FIG.22 illustrates a graphical user interface 2200 for specifying aconfiguration file, in accordance with an example embodiment. A Configfile setting may allow the user to specify a configuration file. If thecurrent ontology is transformed for the first time and no configurationfile exists, a new one may be created at the given location. If nolocation or an invalid one is specified, the configuration may not besaved. If a Do not Overwrite Config File setting is selected, anexisting config file can be specified, but any subsequent changes of theconfiguration in the following dialogs will not be written to this file.This may be used for testing purposes without risking to lose apreviously “well-tended” configuration.

FIG. 23 illustrates a graphical user interface 2300 for specifyinggeneral transformation settings, in accordance with an exampleembodiment. In this dialog, the settings which are relevant for thetransformation as a whole rather than for distinct entities can bespecified. Import Depth may specify to which point the OWL entities ofthe import closure are carried over to the Ecore model. An explanationof the possible values can be found below. Namespace Transformation mayspecify in which way namespaces are transformed. An explanation of thepossible values can be found below. Helper Classes Location may specifyin which package helper classes are placed. Helper classes are classes,which are not explicitly present in the original ontology, but arenecessary in the Ecore model to transform certain concepts, e.g.,individuals which belong to multiple distinct branches in the classhierarchy. An explanation of the possible values can be found below. ACreate Document Root in Ecore Model setting may enable the generation ofa model root element which owns containment references to alltransformed classes, so instances can easily be created and used via thegenerated EMF editors. A Use Document Root for Instance Transformationsetting may specify if the transformed individuals are attached to theabove root element, so they can be easily viewed and modified via thegenerated EMF editors.

FIG. 24 illustrates a graphical user interface 2400 for specifyingdefault settings for distinct entities, in accordance with an exampleembodiment. This dialog may allow users to specify the default settingsfor the ontology's entities. As long as all entities still use thedefault settings, any modification on this dialog affects all entities.As soon as individual settings are applied (e.g., by modification of theconfiguration file via the auto-generated editor), any modification onthis dialog may affect only entities for which no configuration valuesfrom a previous transformation were found. In this case, an additionalcheckbox may be displayed which allows to override this behavior, so thesettings of this dialog can be applied to all entities (while risking tolose manual modifications to the configuration file).

In some embodiments, if the slider is set to an Only TBox, no HelperClasses, no OCL for Classes position, no helper classes will be createdand no OCL constraints will be generated from OWL class descriptions. Insome embodiments, if the slider is set to a TBox+Helper Classes, but noOCL for Classes position, helper classes will be created, but no OCLconstraints will be generated from OWL class descriptions. In someembodiments, if the slider is set to a TBox+Helper Classes+OCL forClasses position, helper classes will be created and OCL constraintswill be generated from OWL class descriptions. With a Transform alsoIndividuals (ABox) setting, it may be possible to transform theindividuals of the ontology to instances in Ecore. A Generate OCLConstraints for Properties setting may enable the generation of allproperty related OCL constraints. A list of the different constrainttypes can be found below. Regarding a Reduce Cardinality forDataProperties from 0..* to 0..1 setting, if no explicit cardinalityrestrictions are given for a property, it may be assumed to be 0..* inOWL. By enabling this setting, 0::1 may be used instead. Regarding anInfer Range and Domain of Object Properties from ABox When Missingsetting, if no domain and/or range was specified for an object property,domain and range may be assumed to be Thing. By enabling this setting,the domain and range may be set to the lowest common supertype (lowestin the sense of the class hierarchy) of all corresponding individuals.

OCL constraints for anonymous class expressions may have to be droppedbecause the corresponding reference in Thing is not available any more.OCL constraints for disjointedness of properties may have to be droppedas well due to incompatible lowest common supertypes. In this case,disjointedness may be naturally provided by the incompatibility of thesetypes.

FIG. 25 illustrates a graphical user interface 2500 for specifying anoutput directory, in accordance with an example embodiment. In thisdialog, the output directory can be specified. The results of thetransformation may be written to this directory. Two files may bewritten to the specified directory. One file may hold the Ecoremetamodel containing the result of the transformation of the TBox; theother file may hold the Ecore model (i.e., an instance of the Ecoremetamodel) containing the result of the transformation of the ABox. Insome embodiments, the second file will not be generated if the ABox isnot transformed.

FIG. 26 illustrates a graphical user interface 2600 for specifying areasoned for the transformation, in accordance with an exampleembodiment. In this dialog, the reasoner for the transformation can beselected or specified. By default, several currently existing reasonersolutions may be looked up on the class path and provided for selectionwhen found. It is also possible to provide further reasoner solutions.To do so, the corresponding libraries may be put into an Eclipsefragment plug-in and exposed in the runtime classpath of the fragmentplug-in. The ID of the host plug-in may be com.sap.owl2ecore.core. Ifthe fully qualified name of a class implementing the OWLReasonerFactoryinterface of the OWL API 3 is supplied, and this implementation is foundin the classpath, this reasoner may be used for the transformation. Bydefault, the plug-in may look for several currently existing reasonersolutions and provide the ones which were found in the drop-down list ofthis control.

Configuration options which can be specified in the configuration fileare discussed below. The configuration file may be a hierarchicallystructured XML file. For better readability a “flat” representation maybe chosen. The configuration file can be edited with standard text orXML editors, but an auto-generated EMF editor may also integrated in theplug-in.

One type of configuration option may be general options, which maydesignate all settings which are relevant for the transformation as awhole rather than for distinct entities. Examples of general optionsinclude the following:

importDepth

-   -   Specifies to which point the OWL entities of the import closure        are carried over to the Ecore model.    -   Possible values:    -   none Only entities which are referenced in the base ontology are        considered.    -   direct Additionally to the entities from setting “none”, all        entities referenced in the ontologies specified in the import        closure are transformed.    -   full Every single entity of the whole import closure is carried        over.

namespaceTransformation

-   -   Specifies in which way namespaces are transformed.    -   Possible values:    -   flat_packages        -   For every namespace, an Ecore package will be created on the            top level of the package structure, so no package hierarchy            will be established.    -   nested_packages        -   This setting takes the path-component of the namespace's IRI            into consideration, so if the IRI of namespace A points to a            sub-path of namespace B, the EPackage created for A will be            a subpackage of the EPackage for B. Example: namespace util            with IRI http://www.sap.com/owl2ecore/util# and namespace            helper with IR http://www.sap.com/owl2ecore/util/helper#            will lead to EPackages util and util.helper.    -   class_name_suffix        -   With this setting, the creation of EPackages is omitted.            Instead, the namespace prefix is appended to the name of the            EClass in the Ecore model, separated by an underscore “_”,            e.g., Thing owl.    -   class_name_suffix_on_conflict        -   Just like for “class name suffix” (see above), the creation            of EPackages is omitted. But the namespace prefix is            appended to the name of the EClass in the Ecore model only            if another class with the same name exists.

locationOfHelperClasses

-   -   Specifies in which package helper classes are placed. Helper        classes are classes, which are not explicitly present in the        original ontology, but are necessary in the Ecore model to        transform certain concepts, e.g., individuals which belong to        multiple distinct branches in the class hierarchy.    -   Possible values:        -   main_package The helper classes are placed in the ontology's            principal Ecore package along with the other classes.        -   separate_package An EPackage is created specially for the            helper classes. In this case, a namespace can be provided            which will be used for the package creation (see below).

helperClassesPackageNamespace

-   -   Specifies to which point the OWL entities of the import closure        are carried over to the Ecore model.    -   Possible values:        -   A namespace definition

documentRoot

-   -   Allows for the generation of a model root element which owns        containment references to all transformed classes and        (optionally) individuals, so instances can easily be created and        used via the generated EMF editors.    -   Subvalues:    -   package The location of the document root in the Ecore model.        -   Possible values:            -   A namespace definition    -   name The name of the document root in the Ecore model.        -   Possible values:            -   Any character string    -   useForTBox Specifies if the document root is generated at all.        -   Possible values:            -   boolean    -   useForABox Determines if the document root (if generated via        useForTBox=true) is used for the transformation of the existing        individuals.        -   Possible values:            -   boolean

setDifferentFromForIndividuals

-   -   Specifies if “DifferentIndividuals”-axioms are to be generated        for every pair of individuals which are not defined to be        “SameIndividuals” or already “DifferentIndividuals”. This can be        used to bring the unique name assumption of the Ecore world to        OWL. Unfortunately, some reasoners (Pellet as of version 2.2.2,        HermiT as of version 1.3.0) do not handle this very well.    -   Possible values:        -   boolean

Another type of configuration option may be classes, which may haveassociated XML elements: namedClass, anonymousClass. It is possible tospecify distinct transformation options for every single class.Configuration wise, classes are separated into named classes (any classexplicitly defined and identified by an IRI) and anonymous classes(implicit classes which were materialized when preparing thetransformation; these classes are identified by an auto-generated IRIbased on hash values, so every class can be re-identified on asubsequent transformation), but currently they do not differ inavailable configuration options. Examples of class options include thefollowing:

id

-   -   The IRI of the class to which the following transformation        options will be applied. In case of named classes, this IRI is        the IRI found in the ontology, in case of an anonymous        (implicit) class, this IRI is auto-generated by hashing the        class.    -   Possible values:    -   Any character string

retained

-   -   Specifies if this class is to be carried over into the Ecore        model or if it should be omitted. Only one representative class        of a group of equivalent classes can be retained. Omitting a        class means that no associated property or individual can be        transformed.    -   Possible values:        -   boolean

name

-   -   Specifies the name which is used for the class in the Ecore        model. This is generally automatically set to the fragment1 of        the class's IRI. This setting is especially useful for assigning        meaningful names to anonymous classes.    -   Possible values:        -   Any character string

ocl.ClassExpressions

-   -   Specifies if anonymous classes, which are used as equivalent        classes, super classes or class restriction for this class,        should be translated into an OCL constraint and added as an        EAnnotation.    -   Possible values:        -   boolean

Another type of configuration option may be properties, which may haveassociated XML elements: objectProperty, dataProperty. Again,transformation options can be specified for every single property.Object properties and data properties share certain options, but bothhave their unique set of options as well.

The following transformation options may apply to object properties, aswell as to data properties:

id

-   -   The IRI of the property to which the following transformation        options will be applied.    -   Possible values:

Any character string

retained

-   -   Specifies if this property is to be carried over into the Ecore        model or if it should be omitted.    -   Possible values:        -   boolean

name

-   -   Specifies the name which is used for the property in the Ecore        model. This is generally automatically set to the fragment2 of        the property's IRI.    -   Possible values:        -   Any character string

subPropertyRelation

-   -   This setting allows to specify several options related to        subproperty relations for each superproperty separately. In        consequence, multiple entries for subPropertyRelation per        property are possible.    -   Subvalues:        -   superProperty            -   The ID of a the superproperty, i.e., its IRI.            -   Possible values:                -   Any character string        -   ocl.SubPropertyRelation            -   Specifies if the super-/subproperty relationship between                two properties should make its way into the Ecore model                via an OCL constraint.            -   Possible values:                -   boolean

ocl.FunctionalProperty

-   -   Specifies if the “functional” characteristic of an property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   boolean

ocl.DisjointProperties

-   -   Specifies if the disjoint property relationship between two        properties should make its way into the Ecore model via an OCL        constraint.    -   Possible values:        -   boolean

ocl.Keys

-   -   Specifies if the fact that an property is declared as key of a        class expression should be reflected in the Ecore model by an        OCL constraint.    -   Possible values:        -   boolean

ocl.NegativePropertyAssertion

-   -   Specifies if negative property assertions for this property        should be expressed in the Ecore model by an OCL constraint.    -   Possible values:        -   boolean

Object properties may have associated XML element: objectProperty. Thefollowing transformation options may apply only to object properties:

pushDown

-   -   This setting allows for a property to be pushed down to        subclasses if no domain and/or range was specified, i.e., domain        and range are implicitly Thing. The default push down behaviour        is to set the domain and range to the lowest common supertype        (lowest in the sense of the class hierarchy) of all        corresponding individuals. Custom domain and range settings can        be made via customPushDown entries. OCL constraints for        anonymous class expressions may have to be dropped because the        corresponding reference in Thing is not available any more. OCL        constraints for disjointness of properties may have to be        dropped as well due to incompatible lowest common supertypes. In        this case, disjointness is naturally provided by the        incompatibility of these types.    -   Possible values:        -   Boolean

customPushDown

-   -   If pushDown is enabled (see above), these entries allow to        specify to which classes this property should be pushed down,        and which type the pushed down reference is supposed to have.        These entries are optional, if none are given, a default push        down behaviour is performed (i.e., lowest common supertype).        Should be used with care, as references from one instance to        another may easily be rendered untransformable and hence be        lost.    -   Subproperty relations via OCL will be discarded. In addition, a        custom push down for the inverse property must be established as        well in order to maintain the opposite reference relation.    -   Subvalues:        -   domain Specifies the domain of the pushed down reference,            i.e., the class to which the reference should be pushed            down.            -   Possible values:                -   An IRI        -   range Specifies the range of the pushed down reference,            i.e., the type of the pushed down reference.            -   Possible values:                -   An IRI

ocl.InverseFunctionalProperty

-   -   Specifies if the inverse functional characteristic of an object        property should be expressed in the model by an OCL constraint.    -   Possible values:        -   Boolean

ocl.SymmetricProperty

-   -   Specifies if the symmetric characteristic of an object property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   boolean

ocl.AsymmetricProperty

-   -   Specifies if the asymmetric characteristic of an object property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   boolean

ocl.TransitiveProperty

-   -   Specifies if the transitive characteristic of an object property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   Boolean

ocl.ReflexiveProperty

-   -   Specifies if the reexive characteristic of an object property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   boolean

ocl.IrreflexiveProperty

-   -   Specifies if the irreexive characteristic of an object property        should be expressed in the model by an OCL constraint.    -   Possible values:        -   boolean

ocl.PropertyChains

-   -   Specifies if property chains which form a subproperty for this        property should be expressed in the Ecore model by an OCL        constraint.    -   Possible values:        -   Boolean

Data properties may have associated XML element: dataProperty. Thefollowing transformation options may apply only to data properties:

cardinality

-   -   If no explicit cardinality restrictions are given for a        property, this parameter can be used to override the default        setting which is 0..* in OWL, but is supposed to be 0..1 in many        cases. This can be helpful, when the creator of the ontology        didn't consider the 0..* default. Only cardinality restrictions        on the domain class can be expressed directly in Ecore and are        thus used to determine the relevance of this setting. Any other        cardinality restriction can only be expressed by OCL and are not        taken into consideration here.    -   Possible values:        -   reduce 0..1 is used.        -   remain 0..* is used.

datatype

-   -   Specifies the datatype which should be used in the Ecore model        for this data property, if a different datatype than the one        from the ontology is desired. A full IRI has to be given, e.g.,        http://www.w3.org/2001/XMLSchema#int. It is recommended to use        the predefined XML Schema simple types.    -   Possible values:        -   An IRI

Individuals may have associated XML elements: namedIndividual,anonymousIndividual. As for classes and properties, it is possible tospecify distinct transformation options for every single individual.Named and anonymous individuals may be separated configuration wise, butcurrently they may not differ in available configuration options.

id

-   -   The identifier of the individuals to which the following        transformation options will be applied. In case of named        individuals, this is the individual's IRI, in case of an        anonymous individual, this is the node ID.    -   Possible values:        -   Any character string

retained

-   -   Specifies if this individual is to be carried over into the        Ecore model for instances. Only one representative individual of        a group of equivalent individuals can be retained.    -   Possible values:        -   boolean

Namespaces may have associated XML element: namespace. The prefix of anamespace may be used as name of an EPackage, when separate packages areto be created. This entry may allow users to redefine a prefix specifiedin the ontology or to define it in the first place in the case ofnamespaces which do not have a prefix assigned. This element can also beused inside other settings which require the specification of anamespace.

iri

-   -   The IRI of the namespace whose prefix is to be (re-)defined.    -   Possible values:        -   An IRI

prefix

-   -   The actual prefix which will be used as package name in the        Ecore model.    -   Possible values:        -   Any character string

To modify transformation options, the plug-in may contain a hierarchicalconfiguration file editor. FIG. 27 illustrates a configuration fileeditor 2700, in accordance with an example embodiment. This editor maybe an auto generated Eclipse plug-in. Due to the fact that theconfiguration options may be modeled as an Ecore data model, EMF's codegeneration facilities may be used to generate the configuration fileeditor.

A configuration file may be automatically created when transforming anontology for the first time. Subsequently, this file can be opened inEclipse. The file extension “.config” may be registered for the editor,so it will automatically be used to open the file if the file is namedaccordingly. Otherwise, it can be opened by right-clicking on theconfiguration file and selecting Open With, then Other . . . , andfinally Config Model Editor.

An example of two transformations being performed on the same exampleontology, but with distinct objectives, is provided below. The firsttransformation aims to preserve as much information as possible, whilethe second transformation aims to obtain a clean and simple softwaremodel.

An example ontology in OWL functional syntax is provided as follows:

  Prefix(owl:=<http://www.w3.org/2002/07/owl#>)Prefix(:=<http://www.sap.com/owl2ecore/ontologies/partOfExample#>)Ontology(<http://www.sap.com/owl2ecore/ontologies/partOfExample>Declaration(Class(:BodyPart)) Declaration(Class(:Arm))Declaration(Class(:Human)) Declaration(Class(:Vehicle))Declaration(Class(:VehiclePart)) Declaration(Class(:Foot))Declaration(Class(:Wheel)) SubClassOf(:Arm :BodyPart) SubClassOf(:Foot:BodyPart) SubClassOf(Wheel :VehiclePart)Declaration(ObjectProperty(:isPartOf)) SubClassOf(:BodyPartObjectAllValuesFrom(isPartOf :Human)) SubClassOf(:VehiclePartObjectAllValuesFrom(isPartOf :Vehicle)) ClassAssertion( :Human :Martin )DataPropertyAssertion( :hasName :Martin ″Martin Knauer″ )DataPropertyDomain( :hasName :Human ) )This example ontology may represent a simple taxonomy of vehicle andvehicle parts, as well as humans and body parts. It may contain thedeclaration of one object property, isPartOf, for which no domain andrange are specified, as well as a data property hasName for the domainHuman. No cardinality restriction is specified for this data property.The ontology contains one individual (Martin).

FIG. 28 illustrates a graphical user interface 2800 for generaltransformation configuration, in accordance with an example embodiment.For both approaches (information preservation vs. model simplicity), thesettings shown in FIG. 28 may be used as general configuration options.The settings for Namespace Transformation and Helper Classes Locationallow the depiction of the class hierarchy as a whole in one singleEcore diagram. A Document Root is useful when creating new instancesusing the auto-generated editor, which is not crucial for this example.

FIG. 29 illustrates a graphical user interface 2900 with a configurationfor maximum preservation, in accordance with an example embodiment. Inorder to preserve a maximum of information, the settings shown in FIG.29 may be chosen. The slider setting specifies that anonymous classesare used in class descriptions are transformed into explicit classes inEcore and their semantics are preserved by embedding the appropriate OCLvalidation delegates on these classes.

The user may also want to transform the individuals of the ontology andgenerate OCL constraints which represent the characteristics of thetransformed properties. To be faithful to the ontology, the user maychoose neither to reduce the cardinality of data properties, nor toinfer domain and range of object properties.

FIG. 30 illustrates an Ecore diagram 3000 after a first informationpreserving transformation, in accordance with an example embodiment. TheisPartOf property may be attached to Thing. The result of the ABoxtransformation is not visible in this diagram.

The names of the anonymous classes may be derived from hash values andmay not be human-readable. In some embodiments, they may be changed viathe auto-generated configuration editor. FIG. 31 illustrates a graphicaluser interface 3100 for customizing the name of anonymous classes, inaccordance with an example embodiment. FIG. 32 illustrates an Ecorediagram 3200 after customizing class names, in accordance with anexample embodiment.

FIG. 33 illustrates a graphical user interface 3300 with a configurationfor a simple model, in accordance with an example embodiment. In orderto obtain a clean and simple model, the settings shown in FIG. 33 may bechosen. In this case, the user may select to neither transform theanonymous classes nor the ABox. Furthermore, the user may select to notgenerate OCL constraints representing property characteristics. The usermay also choose to reduce the cardinality of data properties. The usermay further select to infer domain and range of object properties.

FIG. 34 illustrates an Ecore diagram 3400 of a clean and simple softwaremodel, in accordance with an example embodiment. Again, the user maywant to fine-tune the result by pushing down the isPartOf reference fromthe common supertype to two separate classes. This may be done by usingthe auto-generated configuration editor. FIG. 35 illustrates a graphicaluser interface 3500 for creating CustomPushDown elements for theisPArtOf property, in accordance with an example embodiment. FIG. 36illustrates a graphical user interface 3600 for setting the domain andrange values for the CustomPushDown elements, in accordance with anexample embodiment. FIG. 37 illustrates an Ecore diagram 3700 afterpushing down the isPartOf reference, in accordance with an exampleembodiment.

Modules, Components and Logic

Certain embodiments are described herein as including logic or a numberof components, modules, or mechanisms. Modules may constitute eithersoftware modules (e.g., code embodied on a machine-readable medium or ina transmission signal) or hardware modules. A hardware module is atangible unit capable of performing certain operations and may beconfigured or arranged in a certain manner. In example embodiments, oneor more computer systems (e.g., a standalone, client, or server computersystem) or one or more hardware modules of a computer system (e.g., aprocessor or a group of processors) may be configured by software (e.g.,an application or application portion) as a hardware module thatoperates to perform certain operations as described herein.

In various embodiments, a hardware module may be implementedmechanically or electronically. For example, a hardware module maycomprise dedicated circuitry or logic that is permanently configured(e.g., as a special-purpose processor, such as a field programmable gatearray (FPGA) or an application-specific integrated circuit (ASIC)) toperform certain operations. A hardware module may also compriseprogrammable logic or circuitry (e.g., as encompassed within ageneral-purpose processor or other programmable processor) that istemporarily configured by software to perform certain operations. Itwill be appreciated that the decision to implement a hardware modulemechanically, in dedicated and permanently configured circuitry, or intemporarily configured circuitry (e.g., configured by software) may bedriven by cost and time considerations.

Accordingly, the term “hardware module” should be understood toencompass a tangible entity, be that an entity that is physicallyconstructed, permanently configured (e.g., hardwired) or temporarilyconfigured (e.g., programmed) to operate in a certain manner and/or toperform certain operations described herein. Considering embodiments inwhich hardware modules are temporarily configured (e.g., programmed),each of the hardware modules need not be configured or instantiated atany one instance in time. For example, where the hardware modulescomprise a general-purpose processor configured using software, thegeneral-purpose processor may be configured as respective differenthardware modules at different times. Software may accordingly configurea processor, for example, to constitute a particular hardware module atone instance of time and to constitute a different hardware module at adifferent instance of time.

Hardware modules can provide information to, and receive informationfrom, other hardware modules. Accordingly, the described hardwaremodules may be regarded as being communicatively coupled. Where multipleof such hardware modules exist contemporaneously, communications may beachieved through signal transmission (e.g., over appropriate circuitsand buses) that connect the hardware modules. In embodiments in whichmultiple hardware modules are configured or instantiated at differenttimes, communications between such hardware modules may be achieved, forexample, through the storage and retrieval of information in memorystructures to which the multiple hardware modules have access. Forexample, one hardware module may perform an operation and store theoutput of that operation in a memory device to which it iscommunicatively coupled. A further hardware module may then, at a latertime, access the memory device to retrieve and process the storedoutput. Hardware modules may also initiate communications with input oroutput devices and can operate on a resource (e.g., a collection ofinformation).

The various operations of example methods described herein may beperformed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implemented modulesthat operate to perform one or more operations or functions. The modulesreferred to herein may, in some example embodiments, compriseprocessor-implemented modules.

Similarly, the methods described herein may be at least partiallyprocessor-implemented. For example, at least some of the operations of amethod may be performed by one or more processors orprocessor-implemented modules. The performance of certain of theoperations may be distributed among the one or more processors, not onlyresiding within a single machine, but deployed across a number ofmachines. In some example embodiments, the processor or processors maybe located in a single location (e.g., within a home environment, anoffice environment or as a server farm), while in other embodiments theprocessors may be distributed across a number of locations.

The one or more processors may also operate to support performance ofthe relevant operations in a “cloud computing” environment or as a“software as a service” (SaaS). For example, at least some of theoperations may be performed by a group of computers (as examples ofmachines including processors), these operations being accessible via anetwork (e.g., the network 114 of FIG. 1) and via one or moreappropriate interfaces (e.g., APIs).

Example embodiments may be implemented in digital electronic circuitry,or in computer hardware, firmware, software, or in combinations of them.Example embodiments may be implemented using a computer program product,e.g., a computer program tangibly embodied in an information carrier,e.g., in a machine-readable medium for execution by, or to control theoperation of, data processing apparatus, e.g., a programmable processor,a computer, or multiple computers.

A computer program can be written in any form of programming language,including compiled or interpreted languages, and it can be deployed inany form, including as a stand-alone program or as a module, subroutine,or other unit suitable for use in a computing environment. A computerprogram can be deployed to be executed on one computer or on multiplecomputers at one site or distributed across multiple sites andinterconnected by a communication network.

In example embodiments, operations may be performed by one or moreprogrammable processors executing a computer program to performfunctions by operating on input data and generating output. Methodoperations can also be performed by, and apparatus of exampleembodiments may be implemented as, special purpose logic circuitry(e.g., a FPGA or an ASIC).

A computing system can include clients and servers. A client and serverare generally remote from each other and typically interact through acommunication network. The relationship of client and server arises byvirtue of computer programs running on the respective computers andhaving a client-server relationship to each other. In embodimentsdeploying a programmable computing system, it will be appreciated thatboth hardware and software architectures merit consideration.Specifically, it will be appreciated that the choice of whether toimplement certain functionality in permanently configured hardware(e.g., an ASIC), in temporarily configured hardware (e.g., a combinationof software and a programmable processor), or a combination ofpermanently and temporarily configured hardware may be a design choice.Below are set out hardware (e.g., machine) and software architecturesthat may be deployed, in various example embodiments.

FIG. 38 is a block diagram of a machine in the example form of acomputer system 3800 within which instructions 3824 for causing themachine to perform any one or more of the methodologies discussed hereinmay be executed, in accordance with an example embodiment. Inalternative embodiments, the machine operates as a standalone device ormay be connected (e.g., networked) to other machines. In a networkeddeployment, the machine may operate in the capacity of a server or aclient machine in a server-client network environment, or as a peermachine in a peer-to-peer (or distributed) network environment. Themachine may be a personal computer (PC), a tablet PC, a set-top box(STB), a Personal Digital Assistant (PDA), a cellular telephone, a webappliance, a network router, switch or bridge, or any machine capable ofexecuting instructions (sequential or otherwise) that specify actions tobe taken by that machine. Further, while only a single machine isillustrated, the term “machine” shall also be taken to include anycollection of machines that individually or jointly execute a set (ormultiple sets) of instructions to perform any one or more of themethodologies discussed herein.

The example computer system 3800 includes a processor 3802 (e.g., acentral processing unit (CPU), a graphics processing unit (GPU) orboth), a main memory 3804 and a static memory 3806, which communicatewith each other via a bus 3808. The computer system 3800 may furtherinclude a video display unit 3810 (e.g., a liquid crystal display (LCD)or a cathode ray tube (CRT)). The computer system 3800 also includes analphanumeric input device 3812 (e.g., a keyboard), a user interface (UI)navigation (or cursor control) device 3814 (e.g., a mouse), a disk driveunit 3816, a signal generation device 3818 (e.g., a speaker) and anetwork interface device 3820.

The disk drive unit 3816 includes a machine-readable medium 3822 onwhich is stored one or more sets of data structures and instructions3824 (e.g., software) embodying or utilized by any one or more of themethodologies or functions described herein. The instructions 3824 mayalso reside, completely or at least partially, within the main memory3804 and/or within the processor 3802 during execution thereof by thecomputer system 3800, the main memory 3804 and the processor 3802 alsoconstituting machine-readable media. The instructions 3824 may alsoreside, completely or at least partially, within the static memory 3806.

While the machine-readable medium 3822 is shown in an example embodimentto be a single medium, the term “machine-readable medium” may include asingle medium or multiple media (e.g., a centralized or distributeddatabase, and/or associated caches and servers) that store the one ormore instructions 3824 or data structures. The term “machine-readablemedium” shall also be taken to include any tangible medium that iscapable of storing, encoding or carrying instructions for execution bythe machine and that cause the machine to perform any one or more of themethodologies of the present embodiments, or that is capable of storing,encoding or carrying data structures utilized by or associated with suchinstructions. The term “machine-readable medium” shall accordingly betaken to include, but not be limited to, solid-state memories, andoptical and magnetic media. Specific examples of machine-readable mediainclude non-volatile memory, including by way of example semiconductormemory devices (e.g., Erasable Programmable Read-Only Memory (EPROM),Electrically Erasable Programmable Read-Only Memory (EEPROM), and flashmemory devices); magnetic disks such as internal hard disks andremovable disks; magneto-optical disks; and compact disc-read-onlymemory (CD-ROM) and digital versatile disc (or digital video disc)read-only memory (DVD-ROM) disks.

The instructions 3824 may further be transmitted or received over acommunications network 3826 using a transmission medium. Theinstructions 3824 may be transmitted using the network interface device3820 and any one of a number of well-known transfer protocols (e.g.,HTTP). Examples of communication networks include a LAN, a WAN, theInternet, mobile telephone networks, POTS networks, and wireless datanetworks (e.g., WiFi and WiMax networks). The term “transmission medium”shall be taken to include any intangible medium capable of storing,encoding, or carrying instructions for execution by the machine, andincludes digital or analog communications signals or other intangiblemedia to facilitate communication of such software.

Although an embodiment has been described with reference to specificexample embodiments, it will be evident that various modifications andchanges may be made to these embodiments without departing from thebroader spirit and scope of the present disclosure. Accordingly, thespecification and drawings are to be regarded in an illustrative ratherthan a restrictive sense. The accompanying drawings that form a parthereof, show by way of illustration, and not of limitation, specificembodiments in which the subject matter may be practiced. Theembodiments illustrated are described in sufficient detail to enablethose skilled in the art to practice the teachings disclosed herein.Other embodiments may be utilized and derived therefrom, such thatstructural and logical substitutions and changes may be made withoutdeparting from the scope of this disclosure. This Detailed Description,therefore, is not to be taken in a limiting sense, and the scope ofvarious embodiments is defined only by the appended claims, along withthe full range of equivalents to which such claims are entitled.

Although specific embodiments have been illustrated and describedherein, it should be appreciated that any arrangement calculated toachieve the same purpose may be substituted for the specific embodimentsshown. This disclosure is intended to cover any and all adaptations orvariations of various embodiments. Combinations of the aboveembodiments, and other embodiments not specifically described herein,will be apparent to those of skill in the art upon reviewing the abovedescription.

What is claimed is:
 1. A computer-implemented method comprising:enabling a user to adjust configuration settings for a transformation ofprimitives of a Semantic Web ontology language into primitives of asoftware modeling language the primitives of the Semantic Web ontologylanguage being part of an ontology; storing the adjusted configurationsettings on a storage device; performing, by a machine, thetransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language using the adjustedconfiguration settings stored on the storage device, the performing ofthe transformation comprising: creating a metamodel; adding an instanceof a metamodel class for a top-level class to the metamodel, thetop-level class characterized by having no superclass and being a commonsuperclass for all classes of the ontology; for each top class of aclass hierarchy of the ontology, adding a corresponding instance of themetamodel class to the metamodel, each top class characterized by havingno superclass; associating the top-level class with the instances of themetamodel class corresponding to each top class of the class hierarchy;and for each top class of the class hierarchy of the ontology, adding anannotation comprising a corresponding internationalized resourceidentifier (IRI) for the top class to the instance of the metamodelclass for the top class, adding a corresponding instance of themetamodel class for each subclass of the top class to the metamodel, andassociating the top class with the instances of the metamodel classcorresponding to each subclass of the top class; and enabling aselection of the adjusted configuration settings stored on the storagedevice for use in a subsequent transformation of primitives of theSemantic Web ontology language into primitives of the software modelinglanguage.
 2. The method of claim 1, wherein performing thetransformation comprises generating Object Constraint Language (OCL)constraints for primitives of the software modeling language.
 3. Themethod of claim 1, wherein the semantic web language is ResourceDescription Framework Schema (RDFS).
 4. The method of claim 1, whereinthe semantic web language is Web Ontology Language (OWL).
 5. The methodof claim 1, wherein the software modeling language is Ecore.
 6. Themethod of claim 1, wherein the primitives of the Semantic Web languagecomprise classes, properties, individuals, and resources.
 7. The methodof claim 1, further comprising enabling the user or another user toadjust the adjusted configuration settings for use in the subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.
 8. A system comprising: amachine having at least one processor; and an ontology transformationmodule on the machine, the ontology transformation module beingconfigured to: enable a user to adjust configuration settings for atransformation of primitives of a Semantic Web ontology language intoprimitives of a software modeling language, the primitives of theSemantic Web ontology language being part of an ontology; store theadjusted configuration settings on a storage device; perform thetransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language using the adjustedconfiguration settings stored on the storage device, the performing ofthe transformation comprising: creating a metamodel; adding an instanceof a metamodel class for a top-level class to the metamodel, thetop-level class characterized by having no superclass and being a commonsuperclass for all classes of the ontology; for each top class of aclass hierarchy of the ontology, adding a corresponding instance of themetamodel class to the metamodel, each top class characterized by havingno superclass; associating the top-level class with the instances of themetamodel class corresponding to each top class of the class hierarchy;and for each top class of the class hierarchy of the ontology, adding anannotation comprising a corresponding internationalized resourceidentifier (IRI) for the top class to the instance of the metamodelclass for the top class, adding a corresponding instance of themetamodel class for each subclass of the top class to the metamodel, andassociating the top class with the instances of the metamodel classcorresponding to each subclass of the top class; and enable a selectionof the adjusted configuration settings stored on the storage device foruse in a subsequent transformation of primitives of the Semantic Webontology language into primitives of the software modeling language. 9.The system of claim 8, wherein the ontology transformation module isfurther configured to generate Object Constraint Language (OCL)constraints for primitives of the software modeling language.
 10. Thesystem of claim 8, wherein the semantic web language is ResourceDescription Framework Schema (RDFS).
 11. The system of claim 8, whereinthe semantic web language is Web Ontology Language (OWL).
 12. The systemof claim 8, wherein the software modeling language is Ecore.
 13. Thesystem of claim 8, wherein the primitives of the Semantic Web languagecomprise classes, properties, individuals, and resources.
 14. The systemof claim 8, wherein the ontology transformation module is furtherconfigured to enable the user or another user to adjust the adjustedconfiguration settings for use in the subsequent transformation ofprimitives of the Semantic Web ontology language into primitives of thesoftware modeling language.
 15. A non-transitory machine-readablestorage device, tangibly embodying a set of instructions that, whenexecuted by at least one processor, causes the at least one processor toperform a set of operations comprising: enabling a user to adjustconfiguration settings for a transformation of primitives of a SemanticWeb ontology language into primitives of a software modeling language,the primitives of the Semantic Web ontology language being part of anontology; storing the adjusted configuration settings on a storagedevice; performing the transformation of primitives of the Semantic Webontology language into primitives of the software modeling languageusing the adjusted configuration settings stored on the storage device,the performing of the transformation comprising: creating a metamodel;adding an instance of a metamodel class for a top-level class to themetamodel, the top-level class characterized by having no superclass andbeing a common superclass for all classes of the ontology; for each topclass of a class hierarchy of the ontology, adding a correspondinginstance of the metamodel class to the metamodel, each top classcharacterized by having no superclass; associating the top-level classwith the instances of the metamodel class corresponding to each topclass of the class hierarchy; and for each top class of the classhierarchy of the ontology, adding an annotation comprising acorresponding internationalized resource identifier (IRI) for the topclass to the instance of the metamodel class for the top class, adding acorresponding instance of the metamodel class for each subclass of thetop class to the metamodel, and associating the top class with theinstances of the metamodel class corresponding to each subclass of thetop class; and enabling a selection of the adjusted configurationsettings stored on the storage device for use in a subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.
 16. The device of claim15, wherein performing the transformation comprises generating ObjectConstraint Language (OCL) constraints for primitives of the softwaremodeling language.
 17. The device of claim 15, wherein the semantic weblanguage is Resource Description Framework Schema (RDFS).
 18. The deviceof claim 15, wherein the semantic web language is Web Ontology Language(OWL).
 19. The device of claim 15, wherein the software modelinglanguage is Ecore.
 20. The device of claim 15, wherein the set ofoperations further comprises enabling the user or another user to adjustthe adjusted configuration settings for use in the subsequenttransformation of primitives of the Semantic Web ontology language intoprimitives of the software modeling language.